Fraction:

- toString(), returns string as a/b
This commit is contained in:
HeshamTB 2020-08-30 14:15:33 +03:00
parent d2b0d3c453
commit 225aa67765
Signed by: Hesham
GPG Key ID: 74876157D199B09E

View File

@ -73,4 +73,8 @@ public class Fraction {
return null; return null;
} }
public String toString(){
return String.format("%d/%d", this.numerator, this.denominator);
}
} }