Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我们如何在不使用嵌套循环的情况下浏览二维数组。即只使用一个循环。
String ar[][]=new String [3][4];
这里有一个提示:
int i = 9; System.out.println(i / 4); // 2 System.out.println(i % 4); // 1