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 null in java?
How many bytes is a url?
What are disadvantages of java?
What is difference between hashset and hashmap?
Difference between string, stringbuffer and stringbuilder?
What is a numeric format?
How many characters is 16 bytes?
Why we use set in java?
Who developed java?
What is the difference between math floor and math round?
How do you stop a thread in java?
What is slash r?
Why do people says “java is robust”?
Can we have 2 main methods in java class?
What is scanner in java?