What is meant by final class, methods and variables?
Answers were Sorted based on User's Feedback
when you declare a class as final, that class cannot be
extended.In java "String" class is final.
when you declare the variable as final then we can
intialize it only once.it is constant.
when declare the method as final we cannot override the
method
| Is This Answer Correct ? | 12 Yes | 0 No |
Answer / ravikiran(aptech mumbai)
final class:Is the one which cann't be subclassed
final method:Is the one which cann't be overrided
final variable:is the one which acts like a constant
| Is This Answer Correct ? | 12 Yes | 1 No |
Answer / suresh chand
final class: we can't inherit that class
final method: we can't override that method
final variable: we can't change the value of that var.
| Is This Answer Correct ? | 9 Yes | 0 No |
How to perform Singleton of the java class object on multi JVM?
Is special character in java?
What is set and get methods in java?
What is the use of singleton?
what is the difference between multitasking and multithreading?
Why java is not 100% object-oriented?
What is constructor and virtual function?
hoe can u call a constructor of a private classs to other inherited claa??
If goto and const is reserve words than why it is not work in java?
Which of the following classes will have more memory allocated?
Can a class be private in java?
What are keywords in programming?