Why does parsing a float into array cause precision loss error. I am trying to sort data from a text file that contains text, integers and float numbers. Using the for statement causes loss of precision errors. How do I correct this please.
for (float k = 0; k < array.length; k++);
float y = Float.parseFloat( array[k] );
Why would you declare "k" as type float? It should be declared as an int. Also, the ";" at the end of the for loop ends the loop. In other words, the for loop does not apply to the line directly after it since the ";" is there. Repost the code and tell us what errors (if any) you get.
I am working creating a fully encapsulated, homogeneous singly linked data structure. The Listing class and SinglyLinkedList class that are part of the whole application compile fine, but the problem ...