Dart编程实例 - 访问属性和函数
void main() {
Car c= new Car();
c.disp();
}
class Car {
// field
String engine = "E1001";
// function
void disp() {
print(engine);
}
}
void main() {
Car c= new Car();
c.disp();
}
class Car {
// field
String engine = "E1001";
// function
void disp() {
print(engine);
}
}