Q) Final keyword in java is used with
- class fields
- class methods
- All of the above
Q) False statement about final method in java
- Value of final variable cannot be changed once initialized.
- Final method is inherited but we cannot override it
- If you make a class final then you cannot extend the class
- Constructor can be declared as final.
Q) Super keyword in java is used to
- Refer immediate parent class instance variables.
- Invoke immediate parent class methods.
- Invoke immediate parent class constructor.
Q) True statement about extending a class in java is
- A class can extends only one another class
- A class can extends multiple classes.
- A class can extends multiple interfaces.