what is the difference between statis block and static
variable
Answer Posted / narasimha
i wolud like a new point to the above answer.
first the static varibles are inistalized then the static
bloks are executed.
| Is This Answer Correct ? | 3 Yes | 5 No |
Post New Answer View All Answers
What are the practical benefits, if any, of importing a specific class rather than an entire package (e.g. Import java.net.* Versus import java.net.socket)?
Explain the difference between transient and volatile in java?
Is string a wrapper class?
Why should we use singleton pattern instead of static class?
What is static keyword?
Can a top level class be private or protected?
What are the concepts of 'OOPS'?
What is the difference between the font and fontmetrics classes in java programming?
What is assembly condition codes?
Is list thread safe in java?
Is null a value?
What is a stringbuilder?
What is the collections api?
Can you override static methods?
What is bufferedwriter?