Question: Question: What is the purpose of the final keyword when applied to a class in Java? A) It allows the class to be inherited by
Question: What is the purpose of the final keyword when applied to a class in Java?
A) It allows the class to be inherited by subclasses.
B) It prevents the class from being subclassed or extended.
C) It guarantees that all instances of the class are immutable.
D) It ensures that the class can only have one instance (singleton).
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
The detailed answer for the above question is provided below The correct option is B It prevents the class from being subclassed or extended Reason This option is correct because when a class is decla... View full answer

Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock