public class Foo {
private String b;
public String getInfo() {
return ("(" + b + ")");
}
...
}
public class Bar {
Foo foo;
String t2 = foo.getInfo();
...
}
public class Foo {
private final Info info = new Info();
public String getInfo() {
return info.getInfo();
}
...
}
public class Info {
private String b;
public Info() {}
public String getInfo() {
return ("(" + b + ")");
}
}
public class Bar {
Foo foo;
String t2 = foo.getInfo();
...
}