fork download
  1. class C {
  2. class Inner {
  3. private int n;
  4. private void set(int n) { this.n = n; }
  5. public String toString() { return "" + n; }
  6. }
  7. private Inner m;
  8. public C(int n) {
  9. this.m = new Inner();
  10. this.m.set(n);
  11. }
  12. public String toString() {
  13. return "<<" + m + ">>";
  14. }
  15. public static void main(String[] args) {
  16. C c = new C(234);
  17. System.out.println(c);
  18. }
  19. }
  20.  
Success #stdin #stdout 0.07s 381248KB
stdin
Standard input is empty
stdout
<<234>>