Answer Posted / srinivasa
Static block is executed when the class is loaded into the
memory before the main(). Only once it will be executed.
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
In a program, initializing an array of 100 KB is throwing an out of memory exception while there is 100 MB of memory available. Why?
What is a stringbuilder?
What do you mean by exception handling in Java?
How to read and write image from a file ?
Describe what a thread-local variable is in java?
Why singleton is not thread safe?
Is it possible to compare various strings with the help of == operator?
What are the two types of streams offered by java 8?
What do you understand by casting in java language?
What is classes in java?
Is null a string?
What is a condition in programming?
Can extern variables be initialized?
What do you mean by synchronized non access modifier?
Explain about collection interface in java?