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 lambda in java?
What is the difference between assignment and initialization?
What data type is true or false?
Write a program to calculate factorial in java?
What is a bufferedreader?
What is the synonym of string?
Is java a digit method?
Why we go for collections in java?
How do you decide when to use arraylist and linkedlist?
What is the escape character in java?
What is the abstract class?
Can we call the constructor of a class more than once for an object?
Is it possible to override the main method?
What is parsing a sentence?
Is finalize() similar to a destructor?