Skip to content

Instantly share code, notes, and snippets.

@ivanjx
Created January 13, 2020 00:07
Show Gist options
  • Select an option

  • Save ivanjx/0af1ecb83133343e3ed394ae25bc59c6 to your computer and use it in GitHub Desktop.

Select an option

Save ivanjx/0af1ecb83133343e3ed394ae25bc59c6 to your computer and use it in GitHub Desktop.
public class Mahasiswa {
public string NIM;
public string Nama;
public int Angkatan;
public Mahasiswa(string nim, string nama, int angkatan) {
// Variable assignment.
NIM = nim;
Nama = nama;
Angkatan = angkatan;
}
public Mahasiswa() {
}
}
// main.java
Mahasiswa mhs = new Mahasiswa();
mhs.NIM = "123123";
mhs.Nama = "Ivan";
mhs.Angkatan = 2023;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment