what is the difference between static block and static
method
Answer Posted / navaneesh
i think static block is executed, when the class is
loaded.That means at the time of compile time.so that
block sill executed first.
where as static method have to call seperately and also it
can call with out object instance.so it executed when run time.
| Is This Answer Correct ? | 56 Yes | 20 No |
Post New Answer View All Answers
What do you understand by abstract classes?
Explain abstract class in java?
What is the purpose of checked and unchecked exceptions in JAVA?
What is ctrl m character?
What is * argv?
What do you mean by access modifier?
How does the java compiler work?
What does arrays sort do in java?
Define canvas?
Tell me about different OOPS concepts.
Find the value of a specified element of the array arr[i] where 0 <= i <= n-1
What are the differences between Java 1.0 and Java 2.0?
What is the relationship difference the canvas class and the graphics class?
What is the benefit of singleton pattern?
What are static initalizers in java ?