what is a static block?

Answer Posted / madan

static block contains a code which is executed without
object of a class.i.e is excuted at the time of class
loading

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain why wait(), notify() and notifyall() methods are in object class rather than in the reading class?

563


Is minecraft 1.15 out?

551


Can singleton class be inherited in java?

518


What is the difference between static and non-static variables in java programming?

523


what is instanceof operator used in java?

597






What are the methods available in a class?

588


Explain inner classes ?

655


How to display arraylist values in java?

490


Can a method be static?

528


What is the new line character?

560


Can a function return a function?

553


What will happen if a thrown exception is not handled?

566


What is keyset in java?

658


What does math floor () do?

559


When should you use arraylist and when should you use linkedlist?

498