Question

Explain use of super and final keywords in java.

15 Sep 2022
Answer :
Word Count : 538

In Java, the super keyword is used to refer to the immediate parent class of the class in which it is used. It is typically used to access methods or fields of the parent class that have been overridden in the child class.

For example, consider the following class hierarchy:

Copy code
class A {
    public int x = 5;
}

class B extends A {
    public int x = 10;
}
In this example, class B extends class A, and has a field x that overrides the field of the same name in class A. If we have an instance of class B, we can use the x field to access the value defined in class B, but if we want to access ____ ______ ___ _________ ____ _________ ______ _________ ________ ______.
_________ ___ ___ __________ ______ _______ __________ _______ ____ ________.
_______ __________ _____ _______ _________.
____ ____ ______ _____ _______ ___ ____ ________ ____ ________ __________ __________.
_______ _____ _____ _________ ______.
_____ _________ _________ __________ __________ ________ ________ ___ ____ _______.
__________ ______ ________ ____ ______ ____ ______ _______ ______ ___.
_____ __________ ________ ______ ______.
_____ ______ ____ ______ ____ _______ ________.
__________ ___ ______ _____ ____ _____ __________ ________ ___.
_________ __________ ______ __________ ______ ________ __________ ________ ______.
________ ______ ________ _________ __________ ___ ________ ____ ________ ______ _____.
_____ _______ _____ _____ ________ _________ _____ _______ _______ _________ _______.
___ ____ ____ ______ ___ ______ _________ ________ ________ __________ _______ ________.
_________ _______ _______ __________ _____ _______ _________ _________ ____ _____ ___.
___ _______ _______ ______ _____ _______ ______ ________ ________.
____ _____ __________ _______ __________ _________ __________.
_______ _______ _______ _________ ______ ___ _____ ____ _________ _______ ___ _____.
__________ _________ _______ ________ ____ __________ ____ _________ ____ ____.
______ ___ ___ ________ __________ ____ ______.
__________ __________ ________ ___ ______ __________.
_____ ______ _____ ___ ___ _________ ______ ______ ________ _________.
________ __________ _____ _____ _____ ___ ____ _________ _______.
______ _____ ___ ______ ________ ______ ________ _____ ______ _______ ___ ________.
________ __________ ________ _______ _______ ___ _________.
________ _______ __________ ___ ______ ___.
____ _______ ________ ______ ______ ____ ____ _________ __________ __________.
___ _____ _______ ____ _________ _________ ___ ______ ______.
______ ______ _______ __________ _______ ___ _____ _____ __________ _________.
________ __________ ____ _____ __________ ___ _____ ___ ___.
__________ ______ ____ _______ ___ __________.
__________ ______ _____ _________ _______ _____ ____ _____ _____ _______ ___.
_______ ________ __________ _________ ____.
___ ________ ________ ________ __________ _________ ___ _____ ___ ______.
__________ ___ ___ ____ ______.
_____ ___ _________ ________ ____ ______ ________ _________ _______ ___.
__________ _______ __________ _______ _____ ________ ______ _________ ______ ___ ___.
________ __________ ___ __________ _______ ________ _______ ______ ________ _____ ________.
_____ _________ _________ ___ ____.
__________ ______ ____ ___ ____ __________ _________ ___.
_____ ____ __________ _______ ______ ___ _____ _____ _______.
________ ________ ____ ____ _______ ________ ________ __________ ______ ___.
_____ __________ _________ ______ ____ ______ ____.
___ __________ ________ ______ _____ _______ ______ _________ ____ ____ _____.
___ _______ ___ _______ ____ ______ _________ ____ ______ ____.
_______ ____ ___ _____ _______.
Get Full Answer on WhatsApp

IGNOU NEWS
Assignment Submission Last Date Extended Till 30 June 2026 Click Here★★★IGNOU June 2026 TEE Date Sheet Released Click Here★★★
Top
📞
Call Support Instant phone assistance Explain use of super and final keywords in java.
🟢
WhatsApp Chat Fast live messaging
Email Us Business enquiries & support