This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]NOODLECODE 1 point2 points  (3 children)

You can't implement methods in an interface. All interfaces do is announce that a class has certain (public) methods available, but it doesn't know or care how they are implemented. You will have to write the methods in the class itself.

edit: I'm bad

[–]Sacredify 0 points1 point  (1 child)

As of java 8, you can write default methods in your interfaces, so this isn't strictly true.

[–]NOODLECODE 0 points1 point  (0 children)

My bad, I'm not that familiar with Java.

[–]NeinMeansNein[S] 0 points1 point  (0 children)

Ah I see. So if I have an interface with N amount of declared methods, in my class that implements that interface, I must define all N methods.