Please, I have a file which I want to read and it contains some data set in this format: 12.7891 4.5678 1.1234 30.97 etc. After reading and tokenizing the file, I wanted to store it in an array as double but it gives me a NumberFormatException error. What is the problem?
Some lines of the code
while (line != null) { StringTokenizer tokenizer = new StringTokenizer(line, ""); int numOfTokens = tokenizer.countTokens();
while (tokenizer.hasMoreTokens()) { if (numOfTokens <= 64) { for(int index = 0; index < Elements.length; index++) { String matx = tokenizer.nextToken();