Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public String toString()
- {
- String resultat;
- if(numerator == 0)
- {
- resultat = "0";
- }
- else if (denominator == 1)
- {
- resultat = ""+numerator;
- }
- else
- {
- resultat = numerator + "/" + denominator;
- }
- return resultat;
- }
Advertisement
Add Comment
Please, Sign In to add comment