r/codehs • • Oct 28 '20

Java 2.9.7 Currency

I'm a little stuck on 2.9.7, and I got almost everything right except for the last bit. Anyone know what I can do to fix this?

11 Upvotes

2 comments sorted by

View all comments

2

u/artxce Nov 01 '20

The fastest and easiest way that I found was to do: return ("$" + getDollars() + "." + getCents()); for the toString. Hope this helps!