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 the purpose of javac exe?
For ease of programming you can consider the maze as a 2D array with colors represented by below integer and characters (in capital letters). • B - Black • W -White • G- Green • R- Red R B W B W W W W W W B W B B W W W W W W W B W B W W W B W W W W B B W W W B W W W B W W B B B B W B W B W W B W W W B W W W B B B W W B W W W B W W B W B W W W B W B W W W W B B W W W W B W W W W W G Shortest Route Problem: • Solution that finds the shortest Route between Red and Green White will have 1 Weight. Red and Green carry no weights. Shortest path is the path with less weight when you add up the weights in the path.
Explain restrictions on using enum?
Explain the difference between transient and volatile in java?
How to sort elements in a parallel array in java?
Why can't we make a class private in java?
What is treeset and treemap in java?
What does void * mean?
How many bytes is a url?
Can constructor be synchronized?
What are encapsulation, inheritance and polymorphism?
What is the purpose of methodology?
Why we cannot override static method?
what is the difference between preemptive scheduling and time slicing? : Java thread
How can you add and remove nodes in jtree?