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 do you mean by thread safe?

779


What is a line break example?

780


What is a instance variable?

792


Can You Have Virtual Functions In Java?

880


What is Garbage Collection in Java

853


What is object class in java?

697


What is the difference between a local variable and an instance variable?

778


Is java same as core java?

836


What is JVM and is it platform independent?

791


How to perform linear search in java?

765


What is an abstract class and what is it’s purpose?

746


You're given a Boolean 2D matrix, can you find the number of islands?

873


Can we execute a program without main?

768


Why do we need hashset in java?

750


When is the finalize() called? What is the purpose of finalization?

844