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

How many bytes are there?

749


What is difference between class and object in java?

744


Does java vector allow null?

723


Where can I find jdk in my computer?

684


What is an abstract method in java programming?

795


What is stringreader?

707


Can java arraylist hold different types?

725


What is difference between static and abstract class?

751


how to open and edit XML file in Weblogic???

1776


What is natural ordering in java?

728


How do you take thread dump in java?

763


What is a boolean structure?

783


What is the function of compareto in java?

801


How to stop a thread in java? Explain about sleep () method in a thread?

802


What is the difference between the file and randomaccessfile classes?

806