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 3
- Java | final keyword | Question 4
- Unreachable statement using final and non-final variable in Java
- final vs Immutability in Java
- Instance variable as final in Java
- Final static variable in Java
- Final local variables in Java
- Static and non static blank final variables in Java
- Java | Java Packages | Question 3
- Java | Inheritance | Question 5
- Java | Arrays | Question 1
- Java | Operators | Question 3
- Java | Constructors | Question 1
- Java | Inheritance | Question 9