黑马程序员技术交流社区

标题: main函数重载编译通过不能运行 [打印本页]

作者: ZZBY    时间: 2015-9-9 00:30
标题: main函数重载编译通过不能运行
本帖最后由 ZZBY 于 2015-9-9 00:32 编辑

file:///C:/Users/Administrator/Desktop/QQ%E6%88%AA%E5%9B%BE20150908010636.png 如图所示,编译是通过的却不能运行,不知道为什么,不知哪位愿意帮助解惑

作者: ZZBY    时间: 2015-9-9 00:33
  1. class DemoMain
  2. {
  3.         public static void main(String[] args)
  4.         {
  5.                 int x = 10;
  6.                 main(x);
  7.         }

  8.         public static void main(int x)
  9.         {
  10.                 System.out.println(x);
  11.         }
  12. }
复制代码





欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) 黑马程序员IT技术论坛 X3.2