0
Follow
2
View

How can i get a column from 2d array in java [duplicate]

dexian022 注册会员
2023-01-26 09:43

A column has the same length as the number of rows, which is the number of elements in arr.

So change

Object[] column = new Object[arr[0].length];

to

Object[] column = new Object[arr.length];

About the Author

Question Info

Publish Time
2023-01-26 09:43
Update Time
2023-01-26 09:43