what is the difference between static block and static
method
Answer Posted / uday
static block is called when we create an object for that class,so it automatically excutes......
for static methods, we can call this methods by class names not by object....
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
How can we make a class virtual?
What is exception propagation?
Explain purpose of sleep() method in java?
What is JVM and is it platform independent?
Is array a class?
What is internal iteration in java se 8?
What is passing value java?
What is memory leak and how does java handle it?
Difference between predicate, supplier and consumer ?
How to compare strings in java?
What an i/o filter?
What is difference between iterator access and index access?
What is illegal identifier in java?
Is char a method in java?
What is sortedset in java?