diff options
Diffstat (limited to 'usage_examples/ToStringExample_post.jpage')
-rw-r--r-- | usage_examples/ToStringExample_post.jpage | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usage_examples/ToStringExample_post.jpage b/usage_examples/ToStringExample_post.jpage index f348e0dc..67e78f20 100644 --- a/usage_examples/ToStringExample_post.jpage +++ b/usage_examples/ToStringExample_post.jpage @@ -7,6 +7,10 @@ public class ToStringExample { private String[] tags; private int id; + public String getName() { + return this.getName(); + } + public static class Square extends Shape { private final int width, height; @@ -16,11 +20,11 @@ public class ToStringExample { } @Override public String toString() { - return "Square(super=" + super.toString() + ", width=" + width + ", height=" + height + ")"; + return "Square(super=" + super.toString() + ", width=" + this.width + ", height=" + this.height + ")"; } } @Override public String toString() { - return "ToStringExample(" + name + ", " + shape + ", " + Arrays.deepToString(tags) + ")"; + return "ToStringExample(" + this.getName() + ", " + this.shape + ", " + Arrays.deepToString(this.tags) + ")"; } } |