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
Who developed java?
Difference between a process and a program?
Is a copy constructor?
What are the main differences between the java platform and other platforms?
What is the right data type to represent a price in java?
How transient variable is different from volatile variable?
What are thread safe functions?
What is a final class in java?
What is the public method modifier?
How can we make sure main() is the last thread to finish in java program?
What are identifiers in java?
What is a class instance variable?
If two threads have same priority which thread will be executed first ?
What modifiers are allowed for methods in an interface?
What is the difference between abstraction and encapsulation?