How to implement two interfaces in one class in Java?

To implement two interfaces in one class in Java, do this: class MyClass implements Interface1, Interface2.

Here's how you do it:

interface Interface1 {
  void method1();
}

interface Interface2 {
  void method2();
}

public class MyClass implements Interface1, Interface2 {

  @Override
  public void method1() {

  }

  @Override
  public void method2() {

  }
}