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
What is final method in java?
What is the byte order of byte buffer?
What is variable argument in java?
What is java volatile?
What is Applet Stub Interface ?
What is keyword in oop?
What is assembly condition codes?
What is the finalize method do?
How do you check if two strings are equal in java?
Does hashset allow duplicates in java?
What is an exception in java?
Why do we use threads in java?
What is an object's lock and which object's have locks in java programming?
Are strings immutable in java?
What is the size of arraylist in java?