Advanced Java Programming20805 marksFinal keyword and immutability
Write short notes on a. Final keyword b. Object class
Write short notes on a. Final keyword b. Object class [5]
The final keyword in Java is a modifier used to restrict modification. It can be applied in three contexts: 1. Final Variables: - Once assigned, the value cannot be changed - Must be initialized when declared or in the constructor - Example: 2. Final Methods: - Cannot be overridden by subclasses ...