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
What is a method in programming?
What is the latest version of java?
please send me hr interview questions in it industry
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?
What is try-with-resources in java?
Name few java util classes introduced with java 8 ?
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
What are different types of constants?
Are private methods final?
What is the benefit of abstract class?
How to disable caching on back button of the browser?
What are parsing rules?
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?
How would you convert bytes to string?
What is difference between final and finally in java?