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 local variables?
Can a constructor have different name than a class name in java?
Given a singly linked list, find the middle of the list in a single traversal without using temporary variable.
Can an integer be a string?
What is the multi-catch block in java?
What does s mean in regex?
Can a class be private?
How java enabled high performance?
Which number is denoted by leading zero in java?
What is are packages?
Define interface in java?
Why enumeration is faster than iterator?
How do you get length in java?
What is externalizable interface?
What is byte data type?