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 does a method signature consist of?

984


Why is it called a string?

1011


What is meant by vector class, dictionary class, hash table class, and property class?

1156


What is regex used for?

992


Can you give few examples of final classes defined in java api?

1006


What are strings in physics?

1015


What is a Transient Object?

1085


What do you understand by casting in java language?

1029


What is map and hashmap in java?

1064


What is stringjoiner ?

957


What is deserialization?

1030


How to reverse a string in java?

1078


Why set is used in java?

1018


Explain about the main() method in java?

1109


Does list maintain insertion order java?

915