Untitled
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(); }
Leave a Comment