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

what is the difference between static block and static
method

Answer Posted / navaneesh

i think static block is executed, when the class is
loaded.That means at the time of compile time.so that
block sill executed first.

where as static method have to call seperately and also it
can call with out object instance.so it executed when run time.

Is This Answer Correct ?    56 Yes 20 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can a private method be declared as static?

1022


Where and how can you use a private constructor?

995


Where is java located?

1053


What is the exact difference in between unicast and multicast object? Where we will use?

999


What are static variables and functions?

1152


What is a boolean used for?

1115


How is string stored in java?

1060


What exceptions occur during serialization?

1088


What is supplier in java?

1004


What is the difference between static method and instance method in Java?

1209


Can you pass by reference in java?

978


Explain the difference between private, public, package and protected in java?

1044


What are use cases?

980


What is static keyword?

1154


What happens when you invoke a thread’s interrupt method while it is sleeping or waiting?

980