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

Which variable is the independent variable?

987


How do you check if a number is a perfect square?

994


What is local declaration?

977


What package is math in java?

1010


What are the string methods in java?

1101


What is another word for methodology?

1018


What do you mean by hashing?

1116


What is var keyword ?

1192


In a class implementing an interface, can we change the value of any variable defined in the interface?

1096


What is a memory leak in java?

1078


Explain which of the following methods releases the lock when yield(), join(),sleep(),wait(),notify(), notifyall() methods are executed?

1120


Explain the difference between abstract classes and interfaces in java?

1192


Make a data structure and implement an algorithm to print all the files in a directory. (The root directory can have sub-directories too.)

1345


What is difference between overloading and overriding in java?

1034


What's the access scope of protected access specifier?

1043