Created
January 11, 2020 11:37
-
-
Save ivanjx/2756f319cfd8017938545efdb9d69d88 to your computer and use it in GitHub Desktop.
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
static void printBanner() { | |
System.out.println("============================="); | |
System.out.println("Contoh nama program"); | |
System.out.println("Oleh Ivan K"); | |
System.out.println("============================="); | |
} | |
static void printBanner(String nama) { | |
System.out.println("============================="); | |
System.out.println("Contoh nama program"); | |
System.out.println("Oleh " + nama); | |
System.out.println("============================="); | |
} | |
static void printBanner(int umur) { | |
System.out.println("============================="); | |
System.out.println("Contoh nama program"); | |
System.out.println("Oleh Ivan K"); | |
System.out.println("Umur: " + umur); | |
System.out.println("============================="); | |
} | |
// Output: | |
// | |
// printBanner() | |
// ============================= | |
// Contoh nama program | |
// Oleh Ivan K | |
// ============================= | |
// | |
// printBanner("John") | |
// ============================= | |
// Contoh nama program | |
// Oleh John | |
// ============================= | |
// | |
// printBanner(20) | |
// ============================= | |
// Contoh nama program | |
// Oleh Ivan K | |
// Umur: 20 | |
// ============================= |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment