本帖最后由 relice 于 2014-11-4 15:54 编辑
错误提示:Person.java:15: 错误: 缺少方法主体, 或声明抽象
public static void main(String[] args);
^
1 个错误
class Person
{
int ege;
String name;
String job;
void eat()
{
System.out.println(name+ege+"你就是个天才!");
}
void run()
{
System.out.println(name+ege+job+"是个大牛!");
}
public static void main(String[] args)
{
Person BOBO = new Person();
BOBO.ege = 25;
BOBO.name = "Bobo";
BOBO.job = "IT";
BOBO.eat();
BOBO.run();
}
}
|