...
Question 5121 – UGC NET CS 2018 JUNE Paper-2
December 1, 2023
Question 5123 – UGC NET CS 2018 JUNE Paper-2
December 1, 2023
Question 5121 – UGC NET CS 2018 JUNE Paper-2
December 1, 2023
Question 5123 – UGC NET CS 2018 JUNE Paper-2
December 1, 2023

Question 5122 – UGC NET CS 2018 JUNE Paper-2

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

Correct Answer: A

Question 6 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!!