Hi,
I know how to write to the console i.e. system.out.println. But I don't know how to save their response.
When someone answers the question I want to save it in an array.
And then ask another question and save that in another one and so on.
-----------------------------------------
Here is my code:
double [] b = new double [3];
double [] c = new double [7];
Console console = System.console();
//asking questions
System.out.println("what is your name");
---------------------------------------------
(then I want to save this is b[0]).
----------------------------------------------
So I ask a question and this shows in the console and then they answer and I save the answer in b[0], then ask another question and save in b[1].
Thanks in advance
I know how to write to the console i.e. system.out.println. But I don't know how to save their response.
When someone answers the question I want to save it in an array.
And then ask another question and save that in another one and so on.
-----------------------------------------
Here is my code:
double [] b = new double [3];
double [] c = new double [7];
Console console = System.console();
//asking questions
System.out.println("what is your name");
---------------------------------------------
(then I want to save this is b[0]).
----------------------------------------------
So I ask a question and this shows in the console and then they answer and I save the answer in b[0], then ask another question and save in b[1].
Thanks in advance