Patricia Shanahan wrote:
ballpointpenthief wrote:
Only something that compiles can be an SSCCE, but it is an SSCE (static
self-contained example).
sorry, I meant SSCunCE.
It should now be clear why this can't be an instance method (there
might not event *be* any instances)
(I have reason not to use an abstract class.)
public interface TheInterface {
public static String getSomethingReleventToClass();
}
public Class AClass implements TheInterface {
private static String somethingReleventToClass = "This will be
different
in each class"; // *** I've changed this to static here ***
public static String getSomethingReleventToClass() {
return somethingReleventToClass;
}
}
public Class Application {
private TheInterface someClass;
public Application() {
someClass.getSomethingReleventToClass();
}
}
have an implementation of getSomethingReleventToClass. If someClass is
approach works.