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
Can we return null in java?
Tell me a few examples of final classes defined in Java API?
What is a function easy definition?
What is an iterator interface in java programming?
What is consumer in java?
What invokes a thread's run() method in java programming?
How is garbage collection controlled?
Why to use nested classes in java? (Or) what is the purpose of nested class in java?
How can you generate random numbers in java?
What does || || mean in math?
How do you check if a string is lexicographically in java?
Can we sort array in java?
Is it possible to cast an int value into a byte variable? What would happen if the value of int is larger than byte?
What methodology can be utilized to link to a database?
Is java written in c?