just started programming with Java. If I have an array as follows stored in a .txt file:
[10, 22, 30, 55, 10, 20, 19]
How do I convert it back
So if your line is
then you can do
line = line.replace ("[", ""); line = line.replace ("]", "");
then you can use String.split
String vals [] = line.split (",");
then for each val you can use
val
intVal [x] = Integer.valueOf (val[x].trim ());