class Car(){
String color="red";
int mun=4;
void run(){
System.out.println(color+"......"+num);
}
}
class CarDemo{
public static void main(String[] args){
Car c=new Car();
System.out.println("调用car类的run方法");
c.run();
}
}
编译时报错:CarDemo.java:1:需要‘{’
请教朋友们,语法错误在哪? |
|