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 3
- Java | final keyword | Question 2
- 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 local variables in Java
- Final static variable in Java
- Static and non static blank final variables in Java
- Java | Java Packages | Question 3
- Java | Arrays | Question 6
- Java | Arrays | Question 4
- Java | Functions | Question 3
- Java | Packages | Question 2
- Java | Arrays | Question 7