Title: Pertemuan 6: Contructor, Selasa, 22 April 2025 (KP 31 Maret 2025)
Course: 2024-2| SIF21419|Pemrograman Berorientasi Obyek| 4 SKS|4PT1| Senin, 07.30 - 10.30| Rio Kurniawan, M.Cs

Contructor

class Company {

  String name;

  public Company() {

    name = "Programiz";

  }

}

class Main {

  public static void main(String[] args) {

    Company obj = new Company();

    System.out.println("Company name = " + obj.name);

  }

}