Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What are some examples of variable costs?

1005


Is there any case when finally will not be executed?

1001


What is object data type?

1043


Explain where variables are created in memory?

1052


What is a pattern what is an anti pattern?

1030


Explain the features of java?

1066


Can you call one constructor from another if a class has multiple constructors?

1095


Is java written in c?

1017


Difference between keyword and identifier.

1084


What is bom encoding?

1047


Difference between linkedlist and arraylist.

1113


What is the difference between integer parseint and integer valueof?

1046


What is garbage collection? What is the process that is responsible for doing that in java?

1154


What is the use of System class?

1214


What is tree node in java?

1001