Everything in Java is within classes and objects. Java objects hold a state, state are variables which are saved together within an object , we call them fields or member variables. Let start with an example: class Point { int x; int y; } This class defined a point with x and y values.