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

Answer Posted / mary kamal

Static keyword is identified by jvm at the time of class loading,so main() function is the jvm known function it should be identified at the time of class loading...so hence it is named as static

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is ide with example?

726


What are the new features in java 8? Explain

745


How do you clear a method in java?

759


What is the difference between == and === javascript?

818


Is zero a positive integer?

780


What are different types of constants?

742


What is ph and buffers?

745


In java, what is the difference between method overloading and method overriding?

822


List the different types of classloaders in java.

734


Explain the difference between jvm and jre?

801


What is an arraylist in java?

726


Why convert an applet to an application?

876


When is update method called?

894


Can we create constructor in abstract class ?

804


What are the Class Libraries ?

806