idea—Set main method parameters
One, write the program
public class Hel {
public static void main(String[] args) {
String s = args[0]; //接收第一个参数
int i = Integer.parseInt(args[1]); //接收第二个参数:因为args默认是String类型
System.out.println(s+i);
}
}
Two, enter the parameters of the main method
1, the first step
2, the second step,
just run it