Untitled
user_8515817
dart
02/04/2025 10:17 AM
388 B
19
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