In Java, the extends keyword is used for both class inheritance and interface inheritance. A class can extend another class, and an interface can extend another interface, but they cannot be mixed - a class implements an interface using the implements keyword, not extends.