if (args.length()!=0){ get the parameter }orif if (args!=null){ get the parameter }没试过不保证对,第一种对的可能性大,总之二选一
我的意思是在jcreator怎么实现等到参数!出现提示行提供参数!
Tools->RunTime Configuration,然后edit 或者new一个configuration,在弹出对话框的run application页,edit或者new一个configuration,在parameters页,将prompt for main method argument勾上就好了
或 待参数运行。
可以执行!但我就是想在命令行中得到参数!怎么办!
java break1 123
get the parameter
}orif if (args!=null){
get the parameter
}没试过不保证对,第一种对的可能性大,总之二选一