static java example

Example 1: static in java

static keyword is a non-access modifier. static keyword can be used with 
class level variable, block, method and inner class or nested class.

Example 2: java what is static

In the Java programming language, the keyword static indicates that the particular member belongs to a type itself,
rather than to an instance of that type.
This means that only one instance of that static member is created which is shared across all instances of the class.

Tags:

Misc Example