I know Java doesn't support Multiple Inheritance, so this is really confusing me.
I created an Interface, and I wanted that interface to implement two other interfaces (i.e. force all classes that implement my interface to also implement the other two interfaces). When I tried doing this I got an error:
Eclipse gave me an error there saying "Syntax error on token 'implements', extends expected".
So I changed it to this and it got rid of the error:
1 - I thought interfaces couldn't 'extend' anything?
2 - Why can't I 'implement' 2 interfaces here?
3 - If I keep on coding and just leave it as 'extends' instead of 'implements', can anyone see any problems down the road?
I created an Interface, and I wanted that interface to implement two other interfaces (i.e. force all classes that implement my interface to also implement the other two interfaces). When I tried doing this I got an error:
Code:
public interface BUser implements Comparable<BUser>, Comparator<BUser> { ... }
So I changed it to this and it got rid of the error:
Code:
public interface BUser extends Comparable<BUser>, Comparator<BUser> { ... }
1 - I thought interfaces couldn't 'extend' anything?
2 - Why can't I 'implement' 2 interfaces here?
3 - If I keep on coding and just leave it as 'extends' instead of 'implements', can anyone see any problems down the road?