what is the difference between static block and static
method

Answer Posted / sukhvider

static block executes whenever the class loaded in the Java virtual machine that means object is before going to main Method.

Is This Answer Correct ?    1 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is not object oriented programming?

696


Write a java program to print fibonacci series?

748


What is pangram in java?

769


Should you use singleton pattern?

716


What does method mean?

742


Where import statement is used in a java program?

819


How to compare strings in java?

690


What is palindrome in java?

740


What do you mean by aggregation?

822


Can two objects have same hashcode?

745


What is struts in java?

811


Java is Pass by Value or Pass by Reference?

806


Is java 11 paid version?

717


What is the difference between Java and C++?

839


What is output buffer?

790