我最初的接口如下所示。
public interface testMe {
public Set<String> doSomething();
}
public class A implements testMe {
public Set<String> doSomething() {
return // Set<String>
}
}
我之前有实现testMe的类似情况。现在我需要添加一个返回Set<Some Object>
的类。
public class X implements testMe() {
public Set<Some OBject> doSomething() {
}
}
我该如何在不影响现有类的情况下,在接口中添加这个方法?