Rabu, 02 Maret 2011

Percobaan Switch-Case

Percobaan switch-case

Percobaan membuat percabangan tentang kejuaraan dan dapat mendali…
Menggunakan percabangan switch-case



class kejuaraan {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        int Point;

      Point = 3;
        System.out.println("====================");
        System.out.println("Nama : Hadi Atmoko");
        System.out.println("Point : " + Point);
        switch (Point){
            case 1:
                   System.out.println("ket : Perunggu");
                   break;
            case 2:
                   System.out.println("ket : Perak");
                   break;
            case 3:
                   System.out.println("ket : emas");
                   break;
                   default:

        System.out.println("=====================");

        // TODO code application logic here
        }
    }
}

0 komentar:

Posting Komentar