Implementing is for interfaces. Extending is for classes.
In Java, you can implement many interfaces, but extend only one.
If you extend a class, you don't become anything, but you do inherit its members (fields, methods, subclasses).
As per your (vague) question, let's assume:
public interface Interface1 {
void myMethod(Interface1 other); // using public is redundant in interfaces
}
public class Example implements Interface1, Interface2 { ... }
Then Example
is of type Example
(...), and when I need to implement the methods in the interface then:
public void myMethod(Interface1 myObject) {
Example myClass = (Example)myObject;
}
I need to cast to use the methods from Example
.