日记3

    xiaoxiao2021-03-25  93

    public class Main { public static void main(String[] args){ if (args.length ==0|| args[0].equals("-h")) System.out.print("hello,"); else if (args[0].equals("-g")) System.out.print("goodbye,"); for (int i=1;i<args.length;i++) System.out.print(" "+args[i]); System.out.println("!"); }

    }不能理解这个!,输出就是hello。希望可以讲解一下。还有对于数组感觉很模糊。怎样才能把数字输入数组?y也就是怎么把数字初始化。这个不懂。

       

    转载请注明原文地址: https://ju.6miu.com/read-25067.html

    最新回复(0)