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

What is one third plus one third as a fraction?

0 Answers  


difference between java ,c#&java,c++

3 Answers  


How to provide security in java

0 Answers   Infosys, TCS, Tech Mahindra,


What are use cases?

0 Answers  


What is an accessor?

1 Answers   BirlaSoft,






Explain, java is compatible with all servers but not all browsers?

0 Answers  


Are registers volatile?

0 Answers  


What is casting ?

2 Answers  


Can we return null in java?

0 Answers  


How are this() and super() used with constructors in java programming?

0 Answers  


What method is used to know the status of Checkbox(i.e it is checked or unchecked)?

1 Answers  


What is thread safe java?

0 Answers  


Categories