Thing you have to know is object oriented design. Java has the capacity to have programs that are very nice and modular, so using that fact is the best bet for a good java programmer.
Here are some things to know:
1. Java is made of objects, each object is part of a class. A class will contain a definition of an object, so it will contain what variables it has, what methods it can use, the object is the actual instantiation of a class. So you NEVER ACTUALLY USE A CLASS DIRECTLY, you use objects. Think of a class as like a definition, and an object as the actual word.
2. All variables in Java are references, not values. Lets say you have a class called Point, which has a variable x and y. When you have say "Point p = new Point()" p is not a value of x and y, it's a reference to an Point object. IE: p is an ADDRESS IN MEMORY, it is not an object it simply is the address of where the object is! This is important to note cause some weird problems can occur if you don't take this into account, for example
If I have a list of points and I want to fill them with many points, I can't do this
Point p;
List<Point> points = new List<Point>();
for (int i = 0; i < 10; i++) {
p = new Point();
points.Add(p);
}
Because p is simply an ADDRESS to a point, when you add "p" to the list points, you're just adding the REFERENCE, but not the actual point object! So upon execution of this code, you'll have a list full of the SAME POINT OBJECT (the last one you instantiated), not a list of unique point objects. To get a list of unique point objects you'd need to do this
List<Point> points = new List<Point>();
for (int i = 0; i < 10; i++) {
Point p = new Point();
points.Add(p);
}
This way you're assuring that each instantiation in the list points is a new point object. I know, it's a very small change, but I've ran into this bug before and it takes forever to figure out!
If you don't understand any of what I said now, don't worry, but in the future when you become more used to Java you'll realize this advice is important.