what is the difference between static block and static
method

Answer Posted / ravikiran

static block is used to initialize the variables during the
JVM startup.
static methods are getting called with out creation of any
instance.

Is This Answer Correct ?    34 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is method in java ?

631


Why is java multithreaded?

542


What are the Static and Dynamic Variables? Differentiate them.

609


What is meant by collection in java?

560


What are the differences between string and stringbuffer?

593






What is independent and dependent variables in research?

473


What is the purpose of java?

561


What are different access specifiers in java?

571


What is super?

589


What is string [] args?

563


How do you add an arraylist to an array in java?

511


who can i handle multiple client in RMI

1444


What is proper subset?

537


Difference between concurrent hashmap and hashtable and collections

569


What is the exact difference in between Unicast and Multicast object?

1518