0

I want to print only the columns of the 2d array.

for example as an example, I have a 2d array like this:

asdf

ghjk

lizx

cvbn

and I just want it to output the following:

aglc shiv djzb fkxn

how can I do this ? what is the logic behind it?

  • Java doesn't have multidimentional arrays. What you call 2d array is actually an array of arrays. So what you'd need to do is just iterate them and print 1st element – Mirek Pluta Nov 17 '21 at 19:28

0 Answers0