class A
{
class B
{
psvm(String args[])
{
}
}
}
if the prg saved in A.java whats the o/p?
Answer Posted / sivadasan
The above code will be compiled succcessfully.
but at runtime it will throw an exception :
Exception in thread "main" java.lang.NoSuchMethodError: main
Because, Java Environment starts its execution from main
method. That method must be declared in the class which is
we are using to save our code.
If any query let me know....
| Is This Answer Correct ? | 2 Yes | 6 No |
Post New Answer View All Answers
What type of value does sizeof return?
What does escaping a character mean?
What do u mean by variable?
What do you understand by java virtual machine?
What function extracts specified characters from a string?
What do the thread?class methods run() and start() do?
Tell me about different OOPS concepts.
What does bitwise or mean?
Can one thread block the other thread?
Why synchronization is important in java?
What is command line used for?
Can arraylist contain null values?
What is null in java?
When do I need to use reflection feature in java?
Is java platform independent?