Implement:
Interfaces are abstract classes, so you can only declare things. A class implements an interface. You can implement multiple interfaces.
Extend:
You extend classes when you want a more specific version of a class.
Example:
// Contract: a pet should play
public interface Pet {
public void play();
}
// An animal eats and sleeps
class Animal {
public void eat();
public void sleep();
}
public class Camel extends Animal {
}
public class Dog extends Animal implements Pet {
public void play() {...}
}
Both Camel and Dog are animals, so they extend Animal
class. But only the Dog is a specific kind of Animal
that also can be a Pet