what is the difference between statis block and static
variable

Answer Posted / ramakrishna

Static block is the block which is executed first in the
program. Static variable is the common variable which is
shared by all the objects. Static variable is not specific
to any object.

Is This Answer Correct ?    11 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the significance of continue jump statement? Explain with an example.

762


What are classloaders?

608


What do you mean by local variable and instance variable?

529


Have you ever used hashtable and dictionary?

591


Explain the difference between the public, private, final, protected, and default modifiers?

563






Explain how hashmap works?

598


What is difference between fileinputstream and filereader in java?

573


How to create com object in Java?

659


What are the advantages of defining packages in java?

519


What is array class in java?

606


Hi.... I applied for the post of scientific officer/Engineer-SB(Programmer).Please post the syllabus and sample papers.

1522


How will you calculate the depth of a binary tree if the tree contains 15 nodes?

604


What is array in java?

547


When wait(), notify(), notifyall() methods are called does it releases the lock or holds the acquired lock?

552


Do I need java for windows 10?

561