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
Why do we create public static method in java?
What do you understand by the term string pool?
What are the three parts of a lambda expression?
What does s mean in regex?
There are two classes named classa and classb. Both classes are in the same package. Can a private member of classa can be accessed by an object of classb?
Tell some latest versions in JAVA related areas?
What is connection class in java?
How is garbage collection controlled?
What is the size of string?
What is the use of generics? When was it added to the Java development Kit?
Why is java so important?
Explain about static imports in java?
Do we have pointers in java?
how can you catch multiple exceptions in java?
How can I debug the Java security exceptions and AccessControlExceptions?