1. Switch case
Class praktek { public static void main (string args [ ] ) { int point; point = 1; System.out.println (”=====================”); switch (point) { Case 4: Case 3: System.out.println(“ket: medali emas”); break; Case 2: System.out.println(“ket: medali perak”); break; Case 1: System.out.println(“ket: medali perunggu”); break; default; System.out.println(“ket: tidak mendapat medali !”); } System.out.println(“=====================”); } } |
Tidak ada komentar:
Posting Komentar