Sunday, February 22, 2009

example to show the local variable declaration



// simple example to show the local variable
package variables;

public class LocalVariableExample {


public static void main(String[] args) {

int i;
// System.out.println(i); // compile time error variable i might not have been initialized.



}

}



0 comments:

Post a Comment