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

Explain wait(), notify() and notifyall() methods of object class ?

812


What is difference between iterator access and index access?

851


Can this keyword be used to refer static members?

786


Why does java not allow multiple public classes in a java file ?

3914


Is java a utf 8 string?

746


What is a final class in java?

772


What are the four integer types supported by java?

782


How many bytes are there?

749


Is boolean a data type in java?

723


What are instance variables?

821


What is oop principle in java?

741


Is java a virus?

721


Is .net better than java?

765


How do you execute a thread in java?

714


Explain polymorphism citing an example.

805