Assume that B is a class ,C and D are interfaces
which of the following statement is correct?
a. class A extends B implements D, implements C
b.class A extends B implements C, D
c. class A implements D,C extends B
d. class A implements D extends B,C
Answers
Answered by
3
Output based on Class and Interface
Explanation:
B is class, C and D are interfaces
Multiple inheritance can be implement in java by using interface. So the correct option for this question is b. class A extends B implements C, D.
Without interface, we can not allow multiple inheritance concept. In java, if we try to apply multiple inheritance using class, the same thing can available in another class in a different way so that the subclass cannot choose which one to call.
Answered by
2
Option(b) is the correct answer to the given question
Explanation:
- In the Java programming language we have used the extends keyword to inherit the class .
- In the java programming language we have used the implements keyword to inherit the interface in the class .However the to declared the interface we have used the interface keyword .
- So class A will inherit the class B and implements the class c and the class D
- All the other options are not follow the correct syntax that's why they are incorrect option .
Learn More :
- brainly.in/question/5481866
- brainly.in/question/8851236
- brainly.com/question/13105881
Similar questions