+ 2

How can I store UserInput in a 2d array (Java) ?

I've been struggling with an assignment in which I have a 2d array let's say int [][] array ={{1,2,3}, {4,5,6}, {7,8,9}}; and I have to store the UserInput (3 Integers) in the next free space in my array [3][0]... [3][n], The input ends up when the user type 0. Thanks in advance to my beloved solo learn community for every piece of help.

21st Dec 2017, 11:45 PM
Vas
Vas - avatar
5 Answers
+ 2
https://code.sololearn.com/cecOQIZyUfu2/?ref=app Check this one this may help you 👍
22nd Dec 2017, 3:18 AM
Hrishikesh Kulkarni
Hrishikesh Kulkarni - avatar
+ 2
oh ok
22nd Dec 2017, 2:18 PM
LunarCoffee
LunarCoffee - avatar
+ 1
Uh, not quite sure what you mean by that. Do you mean another array in the first dimension with all three elements, or something else?
22nd Dec 2017, 1:15 AM
LunarCoffee
LunarCoffee - avatar
+ 1
Thanks #Hrishikesh I have 0 experience with c++ but I've heard is like Java's stronger big brother.
22nd Dec 2017, 10:37 AM
Vas
Vas - avatar
+ 1
@LunarCoffee actually I need to store the user input , which are basically 3 Integers in my existing 2d array, the assignment doesn't elaborate more.
22nd Dec 2017, 10:39 AM
Vas
Vas - avatar