Created
January 13, 2020 00:07
-
-
Save ivanjx/0af1ecb83133343e3ed394ae25bc59c6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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