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 function of java?

733


Explain a situation where finally block will not be executed?

768


What are the rules for variable declaration?

693


List any five features of java?

780


what is the purpose of using rmisecuritymanager in rmi?

762


Is string a data type in java?

793


What is the use of private static?

775


What is the difference between throw and throws keywords?

809


What are the features in java?

801


What is string immutability?

740


Explain java coding standards for classes or java coding conventions for classes?

873


What is a class reference?

770


When object is created and destroyed?

830


How does indexof work?

724


What is += mean in java?

765