Data encapsulation
The Java Programming language allows the programmer to encapsulate data. Encapsulation of data is done to protect the data. If you are writing a peice of software with delecate data, such as a length and width of a window, you can prefix a variable declaration with the keyword "private". The peice of data that has been declared private will only be viewable by methods and contructors from within the same class.
Example
main() public class PrivateTest { private int x = 10; public void getX(){ return x; } }
The variable x can not be accessed out side of the class PrivateTest. In other words only an instance of PrivateTest may modify or look at the variable x. This is useful if x is sensitive. If you have written an API that does graphics you can prevent some application programmer from modifing your variable from his or her classes to help protect them from bad things. Imagine a program that created a thread to calculate velocity of a car. One method set the conditions that the velocity should be calculated under and one calculated the velocity. If an application programmer called the first method and then changed one of the conditions directly unexpected results may occur.
Java is a safe language that has a lot of built in constructs to make it easy to protect the runtime enviroment from fatal crashes. The "private" statement is just another means to that end. It is not strictly necissary to write code that is properly encapsulated but it is a good habit and can make for considerably safer code.