Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


What will happen if we cannot mention "finally" in Java
Program ???

Answers were Sorted based on User's Feedback



What will happen if we cannot mention "finally" in Java Program ???..

Answer / ashok

no problem.if we declare it is better.because compulsory
statements are written in finally block.

Is This Answer Correct ?    18 Yes 0 No

What will happen if we cannot mention "finally" in Java Program ???..

Answer / dhruva

finally must be used while dealing with I/O like,
file,stream and reader, etc.
in finally block, we r closing I/O objects in LIFO way to
avoid curruption of I/O during GC process and also, after
one I/O related program finish execution - just for the
sake of flushing for next use in better way

Is This Answer Correct ?    7 Yes 2 No

What will happen if we cannot mention "finally" in Java Program ???..

Answer / busi

Nothing happend , if any information should be displayed on
console we can use this finally block.Irrespective of code
execution the jvm will display the message on console.

Is This Answer Correct ?    1 Yes 3 No

Post New Answer



More Core Java Interview Questions

What are the parts of a method?

0 Answers  


What is set in java?

0 Answers  


JVM responsibility?

6 Answers   TCS,


Can I learn java without any programming experience?

0 Answers  


Can we assign null to double in java?

0 Answers  






How to restrict a member of a class from inheriting by its sub classes?

0 Answers  


Can we access instance variables within static methods ?

0 Answers  


What is meant by tab pans?

0 Answers  


What is the difference(or similarity if there are some) between object and a variable?

4 Answers   ME,


What are reference variables in java?

0 Answers  


What is the basic concepts of OOPS?

0 Answers   BlackRock,


What are the 5 types of research methods?

0 Answers  






Categories