- class method{
- public static void main(String[] args) throws Exception {
- String startingClassName = args[0];//这句代码是什么意思
- Method mainMethod = Class.forName(startingClassName).getMethod("main",String[].class);
- mainMethod.invoke(null, (Object)new String[]{"111","222","333"});
- }
- }
- public class FanShe6 {
- public static void main(String[] args) {
- for(String arg:args){
- System.out.println(arg);
- }
- }
- }
复制代码 |
|