Login with  Log in with facebook
Hiring Manager? SIGN UP HERE
1

public abstract class A extends B, C implements D, E {
}

What is WRONG with the above class declaration?

Mukesh Kumar
08/20/2011 at 04:37
3 Answers
1
2

There's no multiple inheritance in Java, so you can't write extends B,C

Igor Stojanovic
08/20/2011 at 09:44

2
2

exactly, one class can extend only one class but can implement as many interfaces as you'd like.

Rishi Yadav
08/20/2011 at 13:22

3
2

extends is a keyword which is used to inherit the features from only one class.

However implements is a keword which is used to inherit the features from multiple interfaces.

 

 

Satyanarayana Kakitha
08/21/2011 at 03:46

If you want to post any answer to this forum then you need to log in.
Schedule a Demo

Schedule a Demo with us

Name *
Email *
Phone *
Company *
Details