Untitled
user_8515817
dart
9 months ago
289 B
6
Indexable
class Mobil {
String tipe;
int tahun;
Mobil(this.tipe, this.tahun);
void info () {
print('Mobil $tipe tahun $tahun');
}
}
void main () {
Mobil mobil = Mobil('Sedan', 2020);
Mobil mobil2 = Mobil('SUV', 2021);
mobil.info();
mobil2.info();
}Editor is loading...
Leave a Comment