第2个回答 2008-10-12
如果没有运行参数输入对话框 这样做
import java.util.Scanner;
public class test{
public static void main(String[] args) {
System.out.println("请输入参数(用空格隔开):");
Scanner input = new Scanner(System.in);
String str = input.nextLine();
String[] temp = str.split(" ");
Object obj1 = temp[0];
Object obj2 = temp[1];
//这样得到参数 传参 或者直接使用都可以
}
}