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
Compare Mutex and Semaphore in java.
What is extension method in java?
What is the different types of functions?
Outline the major features of java.
Can variables be used in java without initialization?
What are the actions that can occur when a thread enters blocked state?
Does java initialize arrays to zero?
If I only change the return type, does the method become overloaded?
How will you invoke any external process in java?
What is computer compiler?
what is inner class in java?
Where is jre installed?
What if constructor is protected in java?
What are Normalization Rules? Define Normalization?
What is assembly used for?