数组以及程序格式

来源:互联网 发布:painter2018 mac破解 编辑:程序博客网 时间:2024/04/27 16:01

public class Example{

           public static void main(String args[ ]){

                       int a[ ];

                       a=new int[10];

                       for(int i=0;i<10;i++){

                                   a[i]=i+1;

                       }

                      for(int i=0;i<10;i++){

                                 System.out.println(a[i]);

                     }

            }

}

0 0