Subscribe

RSS Feed (xml)

Powered By

Skin Design:
Free Blogger Skins

Powered by Blogger

Monday, November 19, 2007

java 3d arrays Initial values

You can assign initial values to an array when in a manner very similar to one-dimensional arrays, but with an extra level of braces. The dimension sizes are computed by the compiler from the number of values. This would allocated a 3x3 board

int[][] board = new int[][] {{1,0,0},{0,1,0},{1,2,1}};

No comments:

Post a Comment

Archives