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
Can we declare an array without size in java?
What is passed by reference and pass by value ?
Is 64bit faster than 32 bit?
What is the epoch date?
Can we define constructor in inner class?
What language is java written?
What is the difference between static class and normal class?
How do you sort words in java?
What is the difference between throw and throws in java?
How does hashset works in java?
What is the use of http-tunneling in rmi?
Can each java object keep track of all the threads that want to exclusively access it?
If you are given the name of the function at run time how will you invoke the function?
What is the byte range?
Do you know how to reverse string in java?