Board logo

标题: 书中32页示例2-19求解 [打印本页]

作者: shadehi    时间: 2014-11-6 22:33     标题: 书中32页示例2-19求解

书中32页2-19照了例子来,不能运行,或者说根本没有运行选项,按F1提示the selection cannot be lauched...!求解!
代码:class Myclass {
        public void test(int x){
                System.out.println("x:"+x);
}
}
作者: fwbook    时间: 2014-11-7 10:35

这个代码是不能运行的。因为要运行,必须有main方法。




欢迎光临 万卷图书 (http://wanjuanchina.net/) Powered by Discuz! 7.2