Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

length function for 2D Arrays

$
0
0
Say I have an array:

private GamePiece[][] board = new GamePiece[4][5];



How would I get the length of the row or column? If I wrote: board.length in a for loop, which length is it gonna give me, 4 or 5?

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>