Home arrow static arrow Java Programming [Archive] - Question about decimals and large number values in Java
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - Question about decimals and large number values in Java
This topic has 16 replies on 2 pages.    « Previous | 1 | 2 |

Posts:24,036
Registered: 2/3/03
Re: Question about decimals and large number values in Java  
Jul 22, 2004 12:26 PM (reply 15 of 16)



 
First, don't use Vector unless you can think of a truly excellent reason to do so. Vectors are old classes, shoehorned into the new Collection API. You should use an implementation of List (probably ArrayList). You might also want to consider simply encapsulating the row data as individual value objects. I'm not familiar with Jacob, so I'm afraid I'm not much help there.
 

Posts:27,518
Registered: 11/3/97
Re: Question about decimals and large number values in Java  
Jul 22, 2004 2:26 PM (reply 16 of 16)



 
let me explain the program a little bit more.

I input a set of values to a text file. Now these
values are extreme values and really can be anything
and very large or very small.

I read them into the program in a vector using
vectorresults = ResultSetToVector(testfiledata);

Now I usually transfer them into a csv file, but for
simplicity I will just print them out on the screen.
And these values seem to have been changed.

You have some text and you want to move it from one file to another.

Why does it matter if it is a number or not?

Are you adding something to it? Subtracting? Any numerical operation at all?

If not then it don't convert it to a number, leave it as a string.

If you are doing a numerical operation on it, then the type of the operation and the data can very well mean that you can not provide an exact answer (it is simply not something that a computer can solve using any means) and thus you need to address that in terms of the business and not in terms of technology.
 
This topic has 16 replies on 2 pages.    « Previous | 1 | 2 |