Last active
January 7, 2024 09:30
-
-
Save lol97/aff3259487519786f75fa2a39f81cf90 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
| interface Hello { | |
| public String getHelloFormal(); | |
| } | |
| class Greeting { | |
| //definisikan anonymous class | |
| Hello helloBahasaIndonesia = new Hello(){ | |
| public String getHelloFormal(){ | |
| return "Selamat pagi"; | |
| } | |
| }; | |
| Hello helloSunda = new Hello(){ | |
| public String getHelloFormal(){ | |
| return "Wilujen Sumping"; | |
| } | |
| }; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment