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
What are the two types of exceptions in java? Which are the differences between them?
Can we have any other return type than void for main method?
Can you make a constructor final?
What is main in java?
What are the five major types of reference sources?
Why generics are used in java?
Why is a constant variable important?
Can you inherit a constructor java?
What is multithreading and its advantages?
What is substring 1 in java?
Explain the transient field modifier?
Explain the differences between static and dynamic variables?
What is meant by interface?
What is currentthread()?
What is sorting in java?