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 the purpose of static methods and static variables?

1058


What is the memory leak in java?

1023


What is the final method?

1067


Can a constructor be made final?

1103


What are operators and its types?

1053


What is the main difference between java platform and other platforms?

1085


What data type is a string?

1000


What is a values collection view ?

1079


How can you handle java exceptions?

1016


What is the static import?

1093


Is space a character in java?

999


Is null a string or object in java?

958


What is string example?

1042


What is javac used for?

933


Variable of the boolean type is automatically initialized as?

998