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 percentage in java?

560


What is garbage collection? Can it be forced to run?

537


Does the order of public and static declaration matter in main method?

604


What do you mean by singleton class in java?

503


What are wrapped classes in java programming?

574






What is Java Package and which package is imported by default?

586


What is bufferedreader in java?

573


how does the run() method in runnable work? : Java thread

507


Who found java?

540


how do I create a runnable with inheritance? : Java thread

499


What is numeric function?

531


What are exception handling keywords in java?

599


How do you square a number?

570


What do you mean Abstraction in java?

600


What is an example of a conditional statement?

557