class test
{
private static void main(String []adsf)
{
}
}
explain me that the above code is error or exception
Answer Posted / sri
It will not generate any compile time error, but while
running the program it will generate the output as "main
method is not public".....
Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
Difference between process and thread?
What is a parameter used for?
State some situations where exceptions may arise in java?
Can subclass overriding method declare an exception if parent class method doesn't throw an exception?
Explain enumeration in java?
Why does my function print none?
How many JVMs can run on a single machine and what is the Just-In-Time(JIT) compiler?
What is a war file?
How do you add an element to a set in java?
Difference between static synchronization vs. Instance synchronization?
Explain the usage of this with constructors?
How can you make sure that your singleton class will always return single instance in multi-threaded environment?
How can constructor chaining be done using this keyword?
What happens when a thrown exception is not handled?
What is the major advantage of external iteration over internal iteration?