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

Why synchronization is important in java?

1043


Why volatile is used in java?

1055


What is the difference between path and classpath variables?

1052


Why does abstract class have constructor?

999


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

1103


Do I need to import java.lang package any time? Why?

1387


Does anyone still use java?

1112


What is meant by object oriented programming – oop?

988


What are the four versions of java?

1015


How do you sort objects in java?

960


What is difference between this and super keyword?

988


What do you understand by final value?

1058


Can a static class have a constructor?

1001


List any five features of java?

1030


What is native method in java?

1057