I am new to java programming. My question is this I have a String
array but when I am trying to convert it to an int
array I keep getting
java.lang.NumberFormatException
My code is
private void processLine(String[] strings) {
Integer[] intarray=new Integer[strings.length];
int i=0;
for(String str:strings){
intarray[i]=Integer.parseInt(str);//Exception in this line
i++;
}
}
Any help would be great thanks!!!
int[]
notInteger[]
. – Ockham