I need to read a file using BufferedReader, and on the second line i know there will always be 2 integers: 456 666 for example; but I don't know how many digits they will have, so after extracting the line (type String) with BufferedReader, I read char by char of that string to get the digits and add them to a array of char. When I have all the digits I fill the array with '\0' Example:
array[0] = '4'
array[1] = '5'
array[2] = '6'
array[3] = '\0'
array[4] = '\0'
and so on
Now i wish to turn this array to an integer. I tried to first cast this array to a string and afterward apply Integer.parseInt but i does not work. I have no idea how to fix this problem. any help?