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

Can we convert stringbuilder to string in java?

944


Java.util.regex consists of which classes?

946


How do you convert an int to a string in java?

1069


What are different types of encoding?

1036


What are the common uses of "this" keyword in java ?

972


What is the range of a character variable?

946


Can we change the scope of the overridden method in the subclass?

1330


In which language java is written?

933


What is tree node in java?

927


Tell me the latest versions in java related areas?

1048


What is set and get methods in java?

932


How many arguments can a method have java?

980


Give the difference between the println method and sqrt method?

1043


How do you check if a character in a string is a digit or letter?

1015


What is java virtual machine? Explain

973