What is the use of static keyword in "public static void
main()"

Answer Posted / sadikhasan palsaniya

static method can call without using Object name and can
call using Class name so JVM can use main method for execute it.
so it is require static keyword in main method. without
static JVM cant run Program.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between super class & sub class?

818


How do you get the length of a string in java?

752


How is tree Mirroring implemented?

834


Define max and min heap, also the search time of heap.

835


What is the use of hashmap in java?

797


Explain what pure virtual function is?

805


What is hashset in java?

792


what is difference between equals and ==?

817


What is %02d?

795


What is object-oriented programming?

806


What is serial version uid and its importance in java?

830


Why inputstreamreader is used in java?

786


Does java support multiple inheritances?

800


What's the difference between comparison done by equals method and == operator?

759


What is difference between final and immutable?

795