OOPS
August 29, 2024OOPS
August 29, 2024OOPS
|
Question 160
|
Which of the following is/are correct with reference to Abstract class and interface ?
(a)A class can inherit only one Abstract class but may inherit several interfaces.
(b)An Abstract class can provide complete and default code but an interface has no code.
(a)A class can inherit only one Abstract class but may inherit several interfaces.
(b)An Abstract class can provide complete and default code but an interface has no code.
|
(a) is true
|
|
|
(b) is true
|
|
|
Both (a) and (b) are true
|
|
|
Neither (a) nor (b) is true
|
Question 160 Explanation:
Statement (a) is true.
An abstract class may or may not have abstract methods so that it may provide the complete and default code.
An abstract class may or may not have abstract methods so that it may provide the complete and default code.
Correct Answer: C
Question 160 Explanation:
Statement (a) is true.
An abstract class may or may not have abstract methods so that it may provide the complete and default code.
An abstract class may or may not have abstract methods so that it may provide the complete and default code.
