what is a static block?

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


Please Help Members By Posting Answers For Below Questions

What is the gregoriancalendar class in java programming?

574


How destructors are defined in java?

633


What is the difference between throw and throws in java?

559


What is singleton class in ruby?

564


What is visibility mode?

533






Difference between == and .equals() ?

577


How an object is serialized in java?

533


what is the difference between yielding and sleeping? : Java thread

525


Differentiate between a class and an object.

568


What do you mean by Function Overloading in java?

633


How can we run a java program without making any object?

546


Is zero a natural number?

571


Explain the importance of finally block in java?

570


Why do we create threads in java?

585


Define an abstract class with reference to java.

582