class B implements A, Z { @Override public String getFoo() { return "foo"; } @Override public void getFoo(String value) { } }