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

How much ram can a 64 bit processor theoretically?

910


What is casting in java programming?

1044


If goto and const is reserve words than why it is not work in java?

1974


What is default constructors?

1010


What is the function of static in java?

1087


Can an object subclass another object?

1125


What is palindrome in java?

999


what is meant by abstract class?

1128


What is the definition of tree ?

1055


What are memory tables?

1101


Define linked list and its features with signature?

1005


What is a priority queue java?

999


How do you override a method?

1024


How do you sort arrays in java?

935


Define how can we find the actual size of an object on the heap?

1212