Java Local Variable
Local Variable: A variables declared inside the body of the method or block or constructure is called (Local Variable).
Sometimes meat temporary requirements of the programmer can declare variable inside a method or block or constructure such type of variable called local variables.
Or temporary variables or stack variables or automatics variables.
Eg :
Class Test {
public static void main(String [] args) {
int i = 10; // Local Variable
System.out.println(i);
}
}
output : 10
No comments:
Post a Comment