class A
{
class B
{
psvm(String args[])
{
}
}
}
if the prg saved in A.java whats the o/p?

Answer Posted / amulkumar

Compiletime Error saying----
The method main cannot be declared static; static methods
can only be declared in a static or top
level type

Is This Answer Correct ?    11 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between hashset and hashmap in java?

460


What is the concept of multithreading?

515


Explain abstract class in java?

552


How many bytes is a char in java?

522


What is one third plus one third as a fraction?

479






How do you sort in ascending order in java?

516


What are the differences between throw and throws?

521


What is use of static method?

528


What is args length in java?

653


Why call by value prevents parameter value change?

577


What do you mean by garbage collection used in java?

565


Can substring create new object?

553


What is a boolean output?

516


Why is the singleton pattern considered to be an anti pattern?

466


How to reverse string in java?

610