You may not have permission to write to a file in your root directory and may want to change it to a different directory. I am, of course, presuming you are working on a Windows platform.
Type: Posts; User: jpharte
You may not have permission to write to a file in your root directory and may want to change it to a different directory. I am, of course, presuming you are working on a Windows platform.
Your result (temp) keeps getting overwritten with each loop, so what will happen is temp will really only be set by the last comparison (3 versus 7 in this case). You might want to initialize temp...
What error are you getting?
I think you may want to change
int newNum = ((toUse.numerator * denominator)
- (numerator * toUse.denominator));
With
int newNum = ((numerator * toUse.denominator)
...
You may look at the following:
Beginning Java - Unit 6 Arrays - Bubble Sort
- Jim
You will want to use Character.getNumericValue(temp1) to convert temp1 and temp2 into integer values.
- Jim
Try changing the ##.#0 to ##.00
- Jim
I come with many years of systems development experience and hope to help people out!