int[] Data = null ;
sp = set.replaceAll(" ", ",").split(",");
for (int i=0 ; i<sp.length ; i++){
Data[i] =Integer.parseInt(sp[i]);
}
In this java code i have this error "Exception in thread "main" java.lang.NullPointerException". In fact the int can not saved int value in Data[i]. What should i do to store that? Thanks