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
What two classes are used to read data only?
Can we define constructor in inner class?
What is a qualifier in a sentence?
What are the advantages of unicode?
What are the actions that can occur when a thread enters blocked state?
What is matcher in java?
why are wait(), notify() and notifyall() methods defined in the object class? : Java thread
Why stringbuilder is not thread safe?
Using callable statement how can you pass out parameters, explain with example?
String and stringbuffer both represent string objects. Can we compare string and stringbuffer in java?
What is the output of the below java program?
Explain the use of javap tool.
What do you mean by inner class in java?
Can we call virtual funciton in a constructor ?
What do you understand by access specifiers in Java?