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


Please Help Members By Posting Answers For Below Questions

What is an empirical question?

537


How to run a JAR file through command prompt?

712


Difference between string s= new string (); and string s = "abv";?

740


What are the 2 types of java programs?

561


Is hashset sorted in java?

660






Can a constructor call the constructor of parent class?

535


Are variables stored in ram?

553


What is the function of http?

529


What is the biggest integer?

547


Explain inner classes ?

645


Is string serializable in java?

538


What are byte codes?

655


How is Object Oriented Programming different from Procedure Oriented Programming?

589


How to read and write image from a file ?

554


Given a singly linked list, find the middle of the list in a single traversal without using temporary variable.

608