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

What is lambda in java?

1156


What is the difference between assignment and initialization?

1092


What data type is true or false?

1088


Write a program to calculate factorial in java?

1051


What is a bufferedreader?

1159


What is the synonym of string?

1134


Is java a digit method?

1037


Why we go for collections in java?

1022


How do you decide when to use arraylist and linkedlist?

1046


What is the escape character in java?

1034


What is the abstract class?

1090


Can we call the constructor of a class more than once for an object?

1137


Is it possible to override the main method?

1039


What is parsing a sentence?

1161


Is finalize() similar to a destructor?

1078