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
What is an example of procedure?
What is the difference between Grid and Gridbaglayout?
Wha is the output from system.out.println(“hello”+null); ?
What is a default constructor and also define copy contrucyor?
What is a parameter used for?
When should I use singleton pattern?
In case of inheritance what is the execution order of constructor and destructor?
What is the exact difference in between Unicast and Multicast object? Where will it be used?
How does sublist works in java?
What is the purpose of static methods and static variables?
What is javac_g?
Explain the transient field modifier?
Differentiate between overriding and overloading cases?
What is bufferedwriter?
What exactly is a .class file?