what is static keyword and its uses?
Java static keyword
A Static keyword is used with a class (inner) needed to be instantiated, even this may be referenced by some other class indicating as if it - were a top?level class in the class hierarchy.
when you want to define a class member that will be used independently of any object of that class. Normally a class member must be accessed only in conjunction with an object of its class. However, it is possible to create a member that can be used by itself, without reference to a specific instance. To create such a member, precede its declaration with the keyword static. When a member is declared static, it can be accessed before any objects of its class are created, and without reference to any object. You can declare both methods and variables to be static.