@Test public void testToString() throws Exception { final Rectangle rectangle = new Rectangle(1, 2, 3, 4); assertEquals("[1,2,3,4]", rectangle.toString()); }
@Override public String toString() { return String.format("[%d,%d,%d,%d]", getLeft(), getTop(), getRight(), getBottom()); }
Rectangle { @Override public String toString() { return String.format("[%d,%d,%d,%d]", getLeft(), getTop(), getRight(), getBottom()); } }
Rectangle { @Override public String toString() { return String.format("[%d,%d,%d,%d]", getLeft(), getTop(), getRight(), getBottom()); } Rectangle(int left, int top, int right, int bottom); }
Rectangle { @Override public String toString() { return String.format("[%d,%d,%d,%d]", getLeft(), getTop(), getRight(), getBottom()); } Rectangle(int left, int top, int right, int bottom); int getLeft(); int getTop(); int getRight(); int getBottom(); @Override String toString(); }
Rectangle { @Override public String toString() { return String.format("[%d,%d,%d,%d]", getLeft(), getTop(), getRight(), getBottom()); } Rectangle(int left, int top, int right, int bottom); int getLeft(); int getTop(); int getRight(); int getBottom(); @Override String toString();  }