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 is package private scope in java?
What are heterogeneous objects?
What is r * in math?
What is the size of a string in java?
Can I extend singleton class in java?
What are the methods to rectify ambiguities in the interfaces in JAVA?
What is the purpose of static methods and static variables?
What is floor math?
What is double parsedouble in java?
How to print nodes of a Binary tree?
What does the “final” keyword mean in front of a variable? A method? A class?
What is protected in java?
Is java type safe?
What are the different types of constructor?
give an example for encapsulation?