标题:急救!
取消只看楼主
lvsong1988
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2008-9-18
 问题点数:0 回复次数:0 
急救!
我用的是j2sdk1.4.2 在这里我可不可以像C语言那样用for循环语句向数组中输入数据,再用for循环给输出?
如:public class bijiao{
    public static void main(String args[]) throws IOException{
        int a[];
        a[10]=new int[10];
        System.out.println("Please input the numbers:");
        for(int i=0;i<10;i++)
            int a[i]=(int)System.in.read();
            System.in.skip(2);
        for(int i=0;i<10;i++)
            System.out.print(a[i]+"   ");
    }
}
这是我试着写的,但是有错误,该怎么样修改呢?
搜索更多相关主题的帖子: 急救 
2008-09-26 15:48



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-235342-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016125 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved