public class Test{ public static void main(String args[]){ for(i=0;i System.out.println(""+args[i]); } }}编译:javac Test.java运行:java Test str1 str2 str3显示结果:str1 str2 str3