+ 1
what is the exact meaning of static keyword?
5 ответов
+ 5
if u want to know why main() method is static the reason is that when a member is declared static it can be accessed before any objects of that class are created.And main() is declared static bcoz it must be called before any objects exist
+ 2
Static variables and methods belong to the class instead of a specific variable!
Static methods can be run without create an instance of main!
+ 2
as static word mean like unchanged, changeless, constant, consistent or uniform. same in java static define the attribute or method that are consistent to all ref variable(object) of the class.
+ 2
"static" keyword means whether we have to use an object or not to access the function from main
where as main is always declared static
static can even be replaced by volatile or can be left blank
0
best answer sagar agarwal.