Java Fundamentals
Java Programming
Java Variables
Local variable, Static Variable, Instance Variable.
Automation Testing Guide
Example code:
package helloWorld;
public class Test {
int a= 10; // class level variable
static int b = 23; // Static variable
public static void main(String args[]){
Test obj = new Test();
int c = 25; // local variable
System.out.println("Local variable is" +c);
System.out.println("Class level variable is" +obj.a);
System.out.println("Static variable is" +Test.b);
}
}
On this page of the site you can watch the video online Local, Static and Instance variables in Java | Automation Testing Guide with a duration of hours minute second in good quality, which was uploaded by the user Automation Testing Guide 27 January 2022, share the link with friends and acquaintances, this video has already been watched 37 times on youtube and it was liked by 3 viewers. Enjoy your viewing!