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 the relationship difference the canvas class and the graphics class?

811


What is the list interface in java programming?

800


How do you use compareto method?

763


What is ascii code?

847


What is the difference between jfc & wfc?

809


what is the difference between future and callable interface in java?

884


Explain the pointers in Java?

816


What is difference between hashset and hashmap?

806


Why a dead thread occurs?

779


What is the difference between hashmap and hashtable in java?

784


What is the importance of hashcode() and equals() methods?

797


Where to store local variables?

794


What is dynamic binding(late binding)?

809


Is there any limitation of using inheritance?

821


How java enabled high performance?

812