Created
April 19, 2022 15:11
-
-
Save hariyogi/883700bc0d6eb7f2e6c222d5e2a51789 to your computer and use it in GitHub Desktop.
Record kalo di unwarp
This file contains 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 final class Buah { | |
private final String nama; | |
private final String warna; | |
private final String berat; | |
public Buah(String nama, String warna, String berat) { | |
this.nama = nama; | |
this.warna = warna; | |
this.berat = berat; | |
} | |
public String nama(){return nama;} | |
public String warna(){return warna;} | |
public String berat(){return berat;} | |
// Implementasi equals, hascode dan toString | |
public boolean equals... | |
public int hasCode | |
public String toString | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment