
static keyword with real examplestrong text

Hi Friend,
Here is an example:
class Static {
static int a = 10;
static int b = 20;
}
class StaticKeyword {
public static void main(String args[]) {
System.out.println("a = " + Static.a);
System.out.println("b = " + Static.b);
}
}
For more information, visit the following link:
Thanks
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.