What is non static block in java

Answer Posted / raj_allinterview

Non static block is a block which is surounded by { and }
for ex :

{
//code goes here
}

The code within non static block is executed whenever a new
instance of that class is created.
It is instance block.

Is This Answer Correct ?    25 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a control variable example?

724


hi am an engineering student and my next plan is for ms in either in us or australia i got my passport but i dont know anything bout visa can u give brief idea 1)How to get prepared for visa and 2)How to apply for top universities and 3)How to pay the fee and so on These all are basic questions plz give me a clear idea

1661


What is parse method?

731


How do you invoke a method?

722


What is variable and its types?

749


What is a instance variable?

756


What is an object in java?

746


Can size_t be negative?

776


What is a functional interface?

729


Is hashset ordered?

739


What is square root in java?

769


Is java hard to learn?

672


List some java keywords sun like c, c + + keywords?

765


What is cr keyboard?

838


String class is defined under which package in java?

797