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
Do loops java?
What is the difference in between cpp and java? Can u explain in detail?
How will you invoke any external process in java?
What are byte codes?
Why does java not support operator overloading?
What is remote method invocation (rmi)?
What is dot operator?
What is difference between public static and void?
What does %4d mean in java?
What is the purpose class.forname method?
What is the primary benefit of encapsulation?
What is the basic difference between string and stringbuffer object?
Why java is called not pure object oriented language?
Is heap stored in ram?
What is lifetime variable?