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


Please Help Members By Posting Answers For Below Questions

Explain abstract class in java?

762


Can a constructor be protected?

782


Write a program to find the greatest of three numbers in java?

769


What are locale settings?

731


What is meant by flickering?

839


Why do we use predicate in java?

800


What is set and get methods in java?

738


How does singleton class work?

740


Describe the process as to how substring() methodology mechanisms in java.

784


Can a class have an interface?

748


How hashmap increases its size in java?

711


List some important characteristics on jre

808


What are the object and class classes used for?

787


Is java se open source?

770


What are design patterns and please explain?

827