【习题31】

作者: Xplorist | 来源:发表于2017-04-18 06:59 被阅读4次

    【程序31】
    题目:将一个数组逆序输出。

    package com.share.test31_40;
    
    public class Test31 {
        public static void main(String[] args) {
            test();
        }
        public static void test(){
            int[] a={0,1,2,3,4,5,6,7,8,9};
            for(int i=a.length-1;i>=0;i--){
                System.out.println(a[i]);
            }
        }
    }
    
    

    相关文章

      网友评论

        本文标题:【习题31】

        本文链接:https://www.haomeiwen.com/subject/nmaxzttx.html