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


wat is final...?
wat is finally...?
wat is finalize....?
difference between " final and finally and finalize "...?

Answers were Sorted based on User's Feedback



wat is final...? wat is finally...? wat is finalize....? difference between " final and fina..

Answer / mmkrish

final --> is a keyword. It will be used for variables,
methods and classes also.

final variables --> Cannot change their value.
final Methods --> Cannot override or overload
final Class --> it can never be subclassed.

finally --> is a block used in exception handling. Genrally
used along with try.catch blocks... though try or catch
block executes...finally block should execute at last.
Means, if we have add finally block, it will call though
there is an exeption occurs.

finalize() --> It is a method. This will be used in garbage
collection of java. It will clear all the unused
resources...Cannot Override. It is a protected method.

Is This Answer Correct ?    23 Yes 0 No

wat is final...? wat is finally...? wat is finalize....? difference between " final and fina..

Answer / chaithanya

Final:It is a keyword,constant like c/C++.suppose if we declare a=1,we cannot change that value over the programme.we cannot declare a++.
Finally():It is default block in exception handling.
Finalize():if an object holds non java resources,it must be releases resources before object is destroyed.called garbage collector.it runs periodically.we don't know when gc runs
so the programmer write in manually in finalise method invoked the gc before object is destroyed

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

Interface A { String test(); } Interface B { int test(); } Create a class AB which must implements both A & B interfaces.

17 Answers   Hewitt,


Is break statement can be used as labels in java?

0 Answers  


How do you create a reference in java?

0 Answers  


What is the purpose of main function in java?

0 Answers  


what is a working thread? : Java thread

0 Answers  


What is difference between static class and normal class?

0 Answers  


what is collections in java?

4 Answers  


Can I create any Marker Interface? If yes then how can I use it???

4 Answers  


Tell us something about set interface.

0 Answers  


What is bubble sort in java?

0 Answers  


What is an object?s lock? Give name of object?s that have locks?

2 Answers  


Package1 and Package2 both have a method name lets say "methodA" with different implementation. When I import both the packages in a java class how can I use both the methods?

7 Answers   Ericsson,


Categories