Hello,
I'm trying to read from the command line.
There are 9 numbers and I want to store them in an array as int.
I've alread the following
public static void main(String[] args) throws IOException{
String [] temp;
public static void main(String[] args) throws IOException {
InputStreamReader inputStream = new InputStreamReader(System.in);
BufferedReader keyboard = new BufferedReader(inputStream);
System.out.println("Enter eight numbers from 0 to 9");
String initialstate = keyboard.readLine();
String delimiter = ",";
temp = initialstate.split(delimiter);
for (int i = 0; i < temp.length; i++)
My questions are:
how can I convert the string into a array and store it as an array.