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

Is namespace same as package in java?

984


What is the difference between sleep and wait in java?

966


What is lazy initialization in java?

1012


Differences between external iteration and internal iteration?

1161


How finally used under exception handling?

948


What is java in layman terms?

1012


What are some alternatives to inheritance?

1102


What is illegal identifier in java?

1014


What is the syntax and characteristics of a lambda expression? Explain

1045


Can we make the abstract methods static in java?

1062


How many bytes is a string java?

1023


What is a concrete classes? Is Java object class is concrete class?

983


Is oracle charging for java?

1034


What is data member in java?

1048


What is the purpose of javac exe?

1098