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 is object of class in java?
Why string is not thread safe?
What is a void in java?
Can you declare an interface method static?
Difference between doublesummarystatistics, intsummarystatistics and longsummarystatistics ?
What is Java Package and which package is imported by default?
What java is used for?
What are the differences between the constructors and methods?
What are the high-level thread states in java programming?
What is the difference between hashmap and hashtable in java?
What is the symbol for average?
what state does a thread enter when it terminates its processing? : Java thread
What is a private class in java?
How do you define a set in java?
Explain the difference between collection api and stream api in java8?