DeclarationsThere are two kinds of declaration statements: field declarations, which include a class's instance variables, and local variable declarations.
The following class definition illustrates these points: public class Example { private int size = 0; // Window length and width private int area = 0; // Window's current area public void myMethod() { int mouseX = 0; // Beginning of method block if (condition) { int mouseY = 0; // Beginning of if block ... } // if } // myMethod() } // Example class |