OOP
unknown
dart
9 months ago
230 B
6
Indexable
class Car {
String merk;
int tahun;
Car(this.merk, this.tahun);
void infoMobil() {
print('Mobil: $merk, Tahun Produksi: $tahun');
}
}
void main() {
Car bis = Car("Tayo", 2018);
bis.infoMobil();
}Editor is loading...
Leave a Comment