Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is the name of the java compiler?

1004


Is arraylist ordered in java?

1038


Which number is denoted by leading 0x or 0x in java?

991


What are the main features of java?

912


What is the indent key?

989


Is array primitive data type in java?

942


Do I need java on my computer?

922


Is 0 true or is 1 true?

902


Is java a compiler?

919


How does varargs work in java?

1037


What is boolean false?

929


How will you compute size of a structure?

1073


Can we override private constructor in java?

911


How many bits is a char?

921


How do you declare a destructor in java?

929