what is the difference between static block and static
method
Answer Posted / sukhvider
static block executes whenever the class loaded in the Java virtual machine that means object is before going to main Method.
Is This Answer Correct ? | 1 Yes | 4 No |
Post New Answer View All Answers
What is object in java?
Why should I use abstract class?
What is abstraction in java?
What is the meaning of flag day?
Difference between string, string builder, and string buffer?
What is the maximum size of hashmap in java?
What do you mean by global variable?
How do you sort words in java?
What is a for loop in java?
What is a bubble sort in java?
Can memory leak in java?
How do you check if a number is a perfect square?
Can I import same package/class twice?
Write a java program that prints all the values given at command-line.
Why declare Main() method as a static in java ?