What is the use of static keyword in "public static void
main()"
Answer Posted / rasool
The public keyword is an access specifier, which allows the
programmer to control the visibility of class members. When
a class member is preceded by public, then that member may
be accessed by code outside the class in which it is
declared.In this case, main( ) must be declared as public,
since it must be called by code outside of its class when
the program is started. The keyword static allows main( ) to
be called without having to instantiate a particular
instance of the class.
| Is This Answer Correct ? | 2 Yes | 3 No |
Post New Answer View All Answers
Explain notifyall() method of object class ?
Why is String immutable?
What does sprintf return?
What is the use of parse function in java?
How do you make a thread in java?
What are the super most classes for all the streams?
What is the primitive type short?
What an i/o filter?
What is the replace tool?
What is heterogeneous in java?
Difference between vector and arraylist.
How do I compare two strings in word in java?
What is the Scope of Static Variable?
What is return used for in java?
Explain what are final variable in java?