Technology News, Online Income, Gadgets, Reviews

Technology News, Gadgets and Reviews



Total Pageviews

Tuesday, January 17, 2023

Local Variable In Java

  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 




output : 10

No comments:

Post a Comment