what is the difference between statis block and static
variable

Answer Posted / ravikiran

static block is used to initialize the variables during the
Jvm start up.
static variable is used to declare the class level
variables whose value remains ame for the whole class.

Is This Answer Correct ?    1 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we override the static methods?

771


Is there any case when finally will not be executed?

720


How to avoid memory leak in java?

836


What is the integer of 16?

752


What are the skills required for core java?

760


What is difference between class and object in java?

741


What is a locale?

900


What are the Main functions of Java?

825


What are the rules for variable declaration?

693


What does math floor () do?

730


What does this mean java?

786


Which of the following is not an isolation level in the JDBC

1885


Can java list contain duplicates?

788


Explain about anonymous inner classes ?

805


How we can run a jar file through command prompt in java?

722