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
What are actual parameters?
When does a class need a virtual destructor?
What is the purpose of static methods and variables?
What is the purpose of extern variable?
What is the purpose of format function?
What is function and its uses?
What are strings in physics?
Why we override equals() method?
Name few java.lang classes introduced with java 8 ?
Explain the difference between an object-oriented programming language and object-based programming language?
What design pattern you have used in your project? I answered Factory pattern, how it is implemented? What are its advantage? Do know about Abstract Factory?
What is the difference between size and length in java?
What are the important features of Java 10 release?
what is mutual exclusion? How can you take care of mutual exclusion using java threads? : Java thread
How many bits is a 64 bit byte?