what is the difference between static block and static
method
Answer Posted / mahendra pratap singh
Static blocks execute first n than static method.It means
static block have high priority compare to static method
| Is This Answer Correct ? | 21 Yes | 7 No |
Post New Answer View All Answers
What is a default method?
What are methods of a class?
Which java collection does not allow null?
What is += mean in java?
What is the java virtual machine?
What is advantage of java?
What is the difference between public, private, protected, and friend access?
Explain treeset?
Is class is a data type?
Can string be considered as a keyword?
What is the driver class?
How is string stored in java?
How do you convert string to int in java?
What does indexof mean?
what is aggregation in java?