What does the static keyword mean?

1 answers

The static keyword denotes that a member variable or method can be accessed, without requiring an instantiation of the class to which it belongs.

Sample static method which is shown below:

Static method

static void printGreeting()  
shilpigupta22 shilpigupta22 [Author] 7 months ago votes 0