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
What are some examples of variable costs?
Is there any case when finally will not be executed?
What is object data type?
Explain where variables are created in memory?
What is a pattern what is an anti pattern?
Explain the features of java?
Can you call one constructor from another if a class has multiple constructors?
Is java written in c?
Difference between keyword and identifier.
What is bom encoding?
Difference between linkedlist and arraylist.
What is the difference between integer parseint and integer valueof?
What is garbage collection? What is the process that is responsible for doing that in java?
What is the use of System class?
What is tree node in java?