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 / bhargava

Code will throw exception. Because usually every stand
alone program execution should start with main method. It
should be public other wise this method doesnt exposed to
out side to run.

Is This Answer Correct ?    12 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do listeners work?

1026


When should a function throw an exception?

1029


What is instance synchronization?

1041


What is Java Package and which package is imported by default?

1087


What is the difference between pass by reference and pass by pointer?

1084


Why hashset is used in java?

1062


What do you mean by append?

1055


What are the advantages of encapsulation in java?

1000


Is map sorted in java?

1053


Can java object be locked down for exclusive use by a given thread?

988


How can you handle java exceptions?

1018


Does java set allow duplicates?

1070


Why scanner is used in java?

1058


Why main function is static?

1211


Why can't we use static class instead of singleton?

933