I am given the string \"23 45\" I need to get 2 variables (int a) with the value 23 and (int b) with value 45
if your input String name is ' in ' , then we will have :
String in = "23 45"; String s[] = in.split(" "); int out[] = new int[s.length]; for(int i = 0 ; i < s.length ; i++) out[i] = Integer.parseInt(s[i]);
output is now in out array