class A
{
class B
{
psvm(String args[])
{
}
}
}
if the prg saved in A.java whats the o/p?
Answer Posted / hitesh kumar
Compilation error:-
The method main cannot be declared static; static methods
can only be declared in a static or top level type.
To make it happen you need to declare class B as static
class A{
static class B{
psvm(String arg[]){}
}
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the new line character?
What is the function of log?
What is static keyword?
List out five keywords related to exception handling ?
What is the meaning of course?
how to deploy tomcatserver to weblogic server? write d following steps?
What language is java written?
Write a program in java to find the maximum and minimum value node from a circular linked list.
explain local datetime api in java8?
what is abstract class in Java?
What are methods?
What is the Scope of Static Variable?
Is java 1.7 the same as java 7?
what is the final keyword denotes in java?
What is the difference between comparison done by equals method and == operator?