Discussion:
another 1
(too old to reply)
Eric
2004-09-26 21:02:37 UTC
Permalink
Hi sorry, i forgot to include this question in last email.

the method toString has a string type, when we are returning n/d, do we
need to convert the n, d to string type (since n,d are int), and i know
they will still be outputed even without converting them to string, but
just wondering if that matters.
Igor Ivkovic
2004-09-27 12:51:39 UTC
Permalink
Post by Eric
the method toString has a string type, when we are returning n/d, do we
need to convert the n, d to string type (since n,d are int), and i know
they will still be outputed even without converting them to string, but
just wondering if that matters.
See how Java handles String type. Hint: using the "+" operator can help.

Example:
String myString = "Hello World " + 123;

Igor

Loading...