existantial question
if i have a class hierarchy like:
public class TestSuper {
public static class A {
@Override
public String t
You can either
Add a method to A or B which you call instead.
// to A
public String AtoString() {
return toString();
}
// OR to B
public String AtoString() {
return super.toString();
}
Inline the code of A.toString() to where it is "called"
// inlined A.toString()
String ret = "I am A";
System.out.println( ret );
Both these options suggest a poor design in your classes, however sometimes you have existing classes you can only change in limited ways.