了解三维数组

了解三维数组,第1张

了解三维数组

顺序无关紧要,实际上前一种形式更易于阅读:

final const int RED = 0;final const int GREEN = 1;final const int BLUE = 2;int[][][] colorImage = new int[numRows][numColumns][3];//...int x = getSomeX();int y = getSomeY();int redComponent = colorImage[x][y][RED];int greenComponent = colorImage[x][y][GREEN];int blueComponent = colorImage[x][y][BLUE];


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/5506874.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-13
下一篇 2022-12-13

发表评论

登录后才能评论

评论列表(0条)

保存