What will happen if we cannot mention "finally" in Java
Program ???
Answer Posted / 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 |
Post New Answer View All Answers
Is namespace same as package in java?
What is the difference between sleep and wait in java?
What is lazy initialization in java?
Differences between external iteration and internal iteration?
How finally used under exception handling?
What is java in layman terms?
What are some alternatives to inheritance?
What is illegal identifier in java?
What is the syntax and characteristics of a lambda expression? Explain
Can we make the abstract methods static in java?
How many bytes is a string java?
What is a concrete classes? Is Java object class is concrete class?
Is oracle charging for java?
What is data member in java?
What is the purpose of javac exe?