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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a method in programming?

741


What is the latest version of java?

680


please send me hr interview questions in it industry

1767


2) Suppose there are 5 directories having lot of files (say txt files) in each directory. 2 things :- 2.1) You want to search for filenames which have a particular pattern. 2.2) Out of these filtered files you want to search for a particular keyword or a search string. How can you achieve this?

1922


What is try-with-resources in java?

714






Name few java util classes introduced with java 8 ?

605


23. Storage space in java is of the form Stack Queue Heap List 24. What is java code embedded in a web page known as Applets Servlets scriptlets snippets 25. Which of the following attributes are compulsory with an tag?. code,height & width. 26. What does 'CODEBASE' in an applet tag specify?. Files absolute path.

2154


What are different types of constants?

616


Are private methods final?

570


What is the benefit of abstract class?

603


How to disable caching on back button of the browser?

609


What are parsing rules?

612


I want my class to be developed in such a way that no other class (even derived class) can create its objects. How can I do so?

621


How would you convert bytes to string?

656


What is difference between final and finally in java?

693