+ 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.
5 Réponses
+ 2
https://code.sololearn.com/cecOQIZyUfu2/?ref=app
Check this one this may help you 👍
+ 2
oh ok
+ 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?
+ 1
Thanks #Hrishikesh I have 0 experience with c++ but I've heard is like Java's stronger big brother.
+ 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.