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...

Explain difference between final, finally and finalize?

Answer Posted / ranganathkini

When a class is marked final, it cannot be subclassed. When
a method is marked final, it cannot be overridden by the
subclass. And when a field is marked final, its value once
set, cannot be reset.

finally is the last clause in a try...catch block. It is a
block of statements that is executed irrespective if or if
not an exception was caught in the preceding try block.

finalize is a reserved method in Java, which can be
overridden by classes containing code to release any
expensive resources being held to by the object. Expensive
resources include, native peer objects, file/device/database
connections.

Is This Answer Correct ?    64 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is integer a class?

1077


Define how objects are stored in java?

1058


What is the maximum length of a url?

966


What is an object’s lock and which object’s have locks?

957


Why do we create public static method in java?

1110


What are the two environment variables that must be set in order to run any java programs?

964


How do you convert bytes to character in java?

996


What kind of variables can a class consist?

1057


Is java a super set of javascript?

1101


Can you instantiate the math class in Java?

1090


What classes of exceptions may be thrown by a throw statement?

965


What is array command?

1177


What does i ++ mean in Java?

951


What is return type in java?

1063


If you are given the name of the function at run time how will you invoke the function?

1134