what is the difference between statis block and static
variable

Answer Posted / suresh.m

staticblock,static variables,static method are executed
before creating an object to be created to class.i think
there is no difference between them.

Is This Answer Correct ?    2 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How would you use Bubble Sort to sort the number of elements?

592


Where import statement is used in a java program?

618


Can we pass null as argument in java?

520


What is the difference between method overriding and overloading?

592


If A Class Is Declared Without Any Access Modifiers, Where May The Class Be Accessed?

683






What are the types of arrays in java?

567


If an object is garbage collected, can it become reachable again?

553


How do you implement singleton class?

527


Which is dependent variable?

504


Why is it important to initialize a variable?

505


What is purpose of applet programming?

649


What is lazy programming?

580


What is a website container?

511


What do you mean by stream pipelining in java 8?

749


What is difference between adapter class and listener?

513