亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

自己寫數組不能表達!看不出問題求解釋

自己寫數組不能表達!看不出問題求解釋

亂也 2016-05-26 01:40:03
package com.imooc;public class HTR { public static void main(String[] args) { int[][] s=new int[2][3]; s[0][0]=1; s[0][1]=2; s[0][2]=3; s[1][0]=4; s[1][1]=5; s[1][2]=6; for(int i=0;i<s.length;i++){ for(int j=0;j<s[i].length;i++){ System.out.print(s[i][j]); } System.out.println(); } }}
查看完整描述

1 回答

已采納
?
惟愿_無事常相見

TA貢獻30條經驗 獲得超25個贊

把第二個for循環里的i++換成j++就可以遍歷數組了

查看完整回答
2 反對 回復 2016-05-26
  • 1 回答
  • 1 關注
  • 1441 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號