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

Difference difference paint() and paintcomponent()?

1047


What are the differences between throw and throws?

1104


What is an empty list in java?

1025


Can we inherit a class with private constructor?

1175


What is the generic class?

1013


What does exp mean in math?

1044


What are the advantages of compiled language?

1109


What are the practical benefits, if any, of importing a specific class rather than an entire package (e.g. Import java.net.* Versus import java.net.socket)?

1166


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

1011


Can static method access instance variables ?

1182


What is a default constructor and also define copy contrucyor?

1161


Why chararray() is preferred over string to store the password?

1065


What do you mean by constant time complexity?

1330


what is encapsulation in java? Explain

1172


What is the difference between a loader and a compiler?

1087