...
Question 800 – OOPS
November 29, 2023
Question 795 – OOPS
November 29, 2023
Question 800 – OOPS
November 29, 2023
Question 795 – OOPS
November 29, 2023

Question 799 – OOPS

In Java, which of the following statements is/are True ?

    S1 : The ‘final’ keyword applied to a class definition prevents the class from being extended through derivation.
    S2 : A class can only inherit one class but can implement multiple interfaces.
    S3 : Java permits a class to replace the implementation of a method that it has inherited. It is called method overloading.

Code :

Correct Answer: A

Question 47 Explanation: 
• If a class has multiple methods having same name but different in parameters, it is known as Method Overloading.Method Overloading is a feature that allows a class to have more than one method having the same name, if their argument lists are different. So the option-3 is False.
• The final keyword in java is used to restrict the user. The java final keyword can be used in many context. Final can be: variable, method and class.
• A Java class can only extend one parent class. Multiple inheritance (extends) is not allowed. Interfaces are not classes. However, and a class can implement more than one interface.
A
S1 and S2 only
B
S1 and S3 only
C
S2 and S3 only
D
All of S1, S2 and S3
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!