How can I store UserInput in a 2d array (Java) ? | SoloLearn: Learn to code for FREE!

+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.

12/21/2017 11:45:14 PM

Vas

5 Answers

New Answer

+2

https://code.sololearn.com/cecOQIZyUfu2/?ref=app Check this one this may help you 👍

+2

+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.