What is the use of final keyword in Java?
(A) When a class is made final, a sublcass of it can not be created.
(B) When a method is final, it can not be overridden.
(C) When a variable is final, it can be assigned value only once.
(D) All of the above
Explanation: See final in Java.
Quiz of this Question
- Java | final keyword | Question 2
- Java | final keyword | Question 4
- Java | final keyword | Question 3
- Unreachable statement using final and non-final variable in Java
- final vs Immutability in Java
- Final static variable in Java
- Final local variables in Java
- Instance variable as final in Java
- Static and non static blank final variables in Java
- Java | Java Packages | Question 3
- Java | Operators | Question 8
- Java | Constructors | Question 8
- Java | Functions | Question 8
- Java | Inheritance | Question 9
- Java | Functions | Question 1