Static Keyword:
1. The static keyword is applicable for the Class Members.
2. The static Class Members are accessed using Class Name.
3. Non static members are accessed using through reference variable or object.
4. The static members are loaded once into the memory for program execution.
5. The static members are shared across the objects.
6. Non-static & Static Class Members are inherited to the subclass
Static Program:
Output:
2
B
1
A
ABC
ABC
DEF