class test
{
private static void main(String []adsf)
{

}
}

explain me that the above code is error or exception

Answer Posted / xavier

This will throw a runtime error stating main method not public
This is because main method is the starting point of program
execution and it should be accessible by JVM

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is final method in java?

537


What is the byte order of byte buffer?

560


What is variable argument in java?

555


What is java volatile?

541


What is Applet Stub Interface ?

1962






What is keyword in oop?

514


What is assembly condition codes?

558


What is the finalize method do?

594


How do you check if two strings are equal in java?

576


Does hashset allow duplicates in java?

578


What is an exception in java?

640


Why do we use threads in java?

561


What is an object's lock and which object's have locks in java programming?

563


Are strings immutable in java?

518


What is the size of arraylist in java?

602