Local variables are variables declared within a method.
Local variable declarations can't use public (or the other access modifiers), transient, volatile, abstract, or static
A local variable must be initialized before you try to use it.
public class MainClass{
public static void main(String[] argv){
int i=0;
System.out.println(i);
}
}
|