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 test
{
private static void main(String []adsf)
{

}
}

explain me that the above code is error or exception

Answer Posted / xavier

This will throw a runtime error stating main method not public
This is because main method is the starting point of program
execution and it should be accessible by JVM

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we create public static method in java?

1043


What do you understand by the term string pool?

956


What are the three parts of a lambda expression?

944


What does s mean in regex?

953


There are two classes named classa and classb. Both classes are in the same package. Can a private member of classa can be accessed by an object of classb?

1424


Tell some latest versions in JAVA related areas?

930


What is connection class in java?

905


How is garbage collection controlled?

1114


What is the size of string?

1010


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

963


Why is java so important?

1063


Explain about static imports in java?

949


Do we have pointers in java?

897


how can you catch multiple exceptions in java?

968


How can I debug the Java security exceptions and AccessControlExceptions?

1091