public class Main { 
    public static void main(String args[]){ 
        System.out.println("打印main方法中的输入参数,有"+args.length+"个参数"); 
        for(int i=0;i<args.length;i++){ 
            System.out.println(args[i]); 
        } 
    } 
}

C:\J\TIJ\c10>java Main 1 2 3
打印main方法中的输入参数,有3个参数
1
2
3

 

public class Main { 
    public static void main(String args[]){ 
        short s1 = 1; s1 = s1 + 1;
    } 
}

根本编译不过。

相关文章:

  • 2021-06-26
  • 2022-12-23
  • 2021-11-22
  • 2021-12-04
  • 2021-08-02
  • 2021-08-16
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-05
  • 2022-01-19
  • 2022-12-23
  • 2022-01-02
  • 2022-12-23
  • 2022-01-27
相关资源
相似解决方案