在以下代码块中注释位置填入哪个选项的代码,可以为ia数组中每个元素赋值? public class Lin{ public static void main(String argv[]){ Lin l = new Lin(); l.amethod(); } public void amethod(){ int ia[] = new int[4]; //Start For loop { ia[i]=i; System.out.println(ia[i]); } } }
A.
for(int i=1; i < 5; i++)
B.
for(int i=0; i< ia.length;i++)
C.
for(int i=0; i < ia.length() -1; i++)
D.
for (int i=0; i< ia.length(); i++)
手机使用
分享
复制链接
新浪微博
分享QQ
微信扫一扫
微信内点击右上角“…”即可分享
反馈
参考答案:
举一反三
【简答题】With his firm handling of the dispute, he earned the re______ of his opponents.