How to use static keyword in java Programming .


How to use static keyword.

Methodology: Static is a type of keyword. If we use static keyword in a program, then there will be no space for this in memory. Static  value fix for every object. If we use any static variables or static methods, then the object of the class is not to create. We can call with non-static methods static method but non-static method calls can not be made in static method.
Source code:
                          
Output:   

1 comment:

Powered by Blogger.