what is the difference between static block and static
method
Answer Posted / raghavendra
As soon as the class is loaded, the static block will be
executed. Where as the static method should be called
explictly.
Is This Answer Correct ? | 51 Yes | 4 No |
Post New Answer View All Answers
Is void a wrapper class?
What is a instance variable in java?
How do you allocate memory to object?
What is the difference between java applets and applications?
What is meant by attribute?
I have multiple constructors defined in a class. Is it possible to call a constructor from another constructor’s body?
What is meant by stack and queue?
Make a data structure and implement an algorithm to print all the files in a directory. (The root directory can have sub-directories too.)
Why super is first line in java?
What is charat java?
What is double in java?
How to provide security in java
Write a program to find the greatest of three numbers in java?
What is empty string literal in java?
Explain about oops concepts.