java定义一个4行4列的二维数组。第一行和第4行数据进行交换 刚学不太懂!感谢大佬们!!
展开全部
// java定义一个4行4列的二维数组。第一行和第4行数据进行交换 刚学不太懂!感谢大佬们!!
String[][] inarr = {{"A1","A2","A3","A3"},{"B1","B2","B3","B4"},{"C1","C2","C3","C4"},{"D1","D2","D3","D4"}};
String[] temp = {};
temp = inarr[0];
inarr[0] = inarr[3];
inarr[3] = temp;
// end
String[][] inarr = {{"A1","A2","A3","A3"},{"B1","B2","B3","B4"},{"C1","C2","C3","C4"},{"D1","D2","D3","D4"}};
String[] temp = {};
temp = inarr[0];
inarr[0] = inarr[3];
inarr[3] = temp;
// end
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询