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 object-oriented programming?

1122


Which is better arraylist or vector?

1021


What do you mean by garbage collection used in java?

1067


What is a blocking method in Java?

1240


Is java se open source?

1031


What is difference between calling start() and run() method of thread?

1131


In the below example, what will be the output?

1029


What are streams in java 8?

1004


How can an exception be thrown manually by a programmer?

1003


What is the difference between class & structure?

1227


What does java ide mean?

1140


What are packages in java?

1650


How will you call an Applet using Java Script Function?

1030


What is the use of generics? When was it added to the Java development Kit?

1020


What is tcp ip in java?

1116