Using the “static” Keyword

Static variable A static variable is associated with its class rather than its object; hence they are known as class variables. A static variable is initialized only once when execution of the program starts. A static variable shares its state with all instances of the class.  You access a static variable using its class name… Read More Using the “static” Keyword