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...

when everything can be done by static block then why do we
use main method?.

Answer Posted / guest

the main block is declared as static sothat the java
interpreter could use it without instantiating it,but if we
declare everything as static there is no meaning of a class
and specifying instance variables and methods belong to
that specific class only.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a variable simple definition?

973


Define a java class.

1337


What is a method declaration?

940


What is ide with example?

910


why are there separate wait and sleep methods? : Java thread

975


How is the marker interface used in Java?

1036


What is a method vs function?

979


What is an exception in java?

1059


What is the final method?

1025


Is math an abstract class in java?

948


What is volatile keyword in java

1070


What is percentage in java?

955


Is finalize() similar to a destructor?

977


What is the java reflection api? Why it’s so important to have?

924


How do I get 64 bit java?

1010