Discussion Board
Go to the previous messageGo to the following message
Current Forum: 15-211 Main Forum
Date: Wed Sep 5 2001 4:17 pm
Author: Scherer, Sebastian <sebastian.scherer@cs.cmu.edu>
Subject: Re: HW1 error

Hi!
I guess there is an error in DoIt.java
When a string concat is called with the + sign and the value that should be concatnated is not of type string it tries to call one of the valueOf() operators. The String class contains default valueOf() functions for most primitive types, but not for Floats. So to get the program working I changed it to
Float.toString(pn.compute()) for Example is that correct?
Thank you

Basti
Post response

Go to the previous messageGo to the following message
Current Thread Detail:
HW1 error      Scherer, Sebastian      Wed Sep 5 2001 4:08 pm       
Re: HW1 error      Scherer, Sebastian      Wed Sep 5 2001 4:17 pm       
Re: HW1 error      White, David      Thu Sep 6 2001 9:59 am       
Re: HW1 error      Scherer, Sebastian      Thu Sep 6 2001 11:00 am       
Re: HW1 error      Lee, Peter      Thu Sep 6 2001 1:37 pm       
Re: HW1 error      Chen, Richard      Fri Sep 7 2001 1:52 pm       
Re: HW1 error      Lee, Peter      Sun Sep 9 2001 12:53 am       

Back to previous screen