Skip to content

Commit f012208

Browse files
authored
Update car.java
1 parent 8ad3ab9 commit f012208

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

1-1/car.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class car {
2121
}
2222
@Override
2323
public String toString(){
24-
return String.format("%-20s %-20s %-4d %-5d %-7d %-18s", brand, model, hp,cc,price,color);
24+
return String.format("%-20s %-25s %-4d %-5d %-7d %-18s", brand, model, hp,cc,price,color);
2525
}
2626
@Override
2727
public boolean equals(Object obj) {
@@ -31,8 +31,7 @@ public boolean equals(Object obj) {
3131
return (this.toString().equals(PersonObj.toString()));
3232
}
3333
return false;
34-
}
35-
34+
}
3635
@Override
3736
public int hashCode() {
3837
int hash = 3;

0 commit comments

Comments
 (0)