What is "finally" keyword?

Answer Posted / ss

The finally is Java keyword that is used to defined a block
that is always executed in a try-catch-finally statement.
try{
int x=10/2;
}
finally{
system.out.println("i am from finally");
}
here compiler will not compliant.why?even though x=10/2,x=10/0.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Give an example of call be reference significance.

614


What is are packages?

593


What do you understand by the term singleton?

584


What is singleton pattern?

566


How can u increase the heap size in the memory?

561






Is there any way to skip finally block of exception even if some exception occurs in the exception block?

604


What is r in java?

604


What is definition and declaration?

530


What function extracts specified characters from a string?

573


Can we serialize static variables in java?

665


Define how destructors are defined in java?

594


These static constructors are correct ? class A { statc intA() { } static A(int x,int y) { } static A(int x) { } }

609


What data type is a string?

517


What is the collections api in java programming?

564


What are the methods used to implement for the key object in the hash map?

575