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 name of the java compiler?
Is arraylist ordered in java?
Which number is denoted by leading 0x or 0x in java?
What are the main features of java?
What is the indent key?
Is array primitive data type in java?
Do I need java on my computer?
Is 0 true or is 1 true?
Is java a compiler?
How does varargs work in java?
What is boolean false?
How will you compute size of a structure?
Can we override private constructor in java?
How many bits is a char?
How do you declare a destructor in java?