what is the difference between static block and static
method
Answer Posted / khasim
static block will be called at the time of loading the
class.it can be called once.developer can not be called
expecitly
static method will called at the time of loading the
class.here we can call expecitly by using there classname
Is This Answer Correct ? | 16 Yes | 1 No |
Post New Answer View All Answers
How to perform quicksort in java?
How to run a JAR file through command prompt?
I want my class to be developed in such a way that no other class (even derived class) can create its objects. Define how can I do so?
Difference between a class and an object?
What is meant by stack and queue?
What is the advantage of OOP in java?
Which containers use a flowlayout as their default layout in java programming?
Why is java called java?
Is vector thread safe in java?
What two classes are used to read data only?
What is method reference?
What is a default method?
Can a class be private?
What is increment in java?
When do I need to use reflection feature in java?