This commit is contained in:
parent
a7eda55e9b
commit
7a0d8f3cca
@ -18,7 +18,8 @@ public class Rectangle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String toString(){
|
public String toString(){
|
||||||
String s = "Rectangle size : ";
|
String s = "";
|
||||||
|
s += "Rectangle size : ";
|
||||||
s += this.width;
|
s += this.width;
|
||||||
s += " x ";
|
s += " x ";
|
||||||
s += this.height;
|
s += this.height;
|
||||||
|
@ -5,7 +5,7 @@ import java.awt.Color;
|
|||||||
public class Task1Runner {
|
public class Task1Runner {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
||||||
Rectangle r1 = new Rectangle (10, 5);
|
Rectangle r1 = new Rectangle(10, 5);
|
||||||
Rectangle r2 = new Rectangle (3, 4);
|
Rectangle r2 = new Rectangle (3, 4);
|
||||||
Rectangle r3 = new Rectangle (100, 100);
|
Rectangle r3 = new Rectangle (100, 100);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user