2080 12

BIT401 ยท 2080 ยท 5 marks

Write short notes on a. Final keyword b. Object class

Write short notes on a. Final keyword b. Object class [5]

Advanced Java ProgrammingChapter 1: Object-Oriented Programming FundamentalsFinal keyword and immutability

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 ...