Please enable javascript to view this site.
Coretan-indpras
Facebook
Twitter
Google+
RSS
Home
Admin
About Admin
Accesories
Tukar Link
Barner sobat
Select Menu
Loading...
Home
»
Catatan Kuliahku
»
Java
»
Contoh switch case di java
Contoh switch case di java
Diposting oleh
Unknown
Label:
Java
di
12:09
Sobat indpras langsung saja berikut codingnya
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package op_bulan; /** * * @author indpras */ import java.util.Scanner; public class op_bulan { int bulan; void Show() { Scanner input = new Scanner(System.in); System.out.print("Masukkan bulan ke : "); bulan=input.nextInt(); switch(bulan) { case 1: System.out.print("Januari");break; case 2: System.out.print("Pebruari");break; case 3: System.out.print("Maret");break; case 4: System.out.print("April");break; case 5: System.out.print("Mei");break; case 6: System.out.print("Juni");break; case 7: System.out.print("Juli");break; case 8: System.out.print("Agustus");break; case 9: System.out.print("September");break; case 10: System.out.print("Oktober");break; case 11: System.out.print("November");break; case 12: System.out.print("Desember");break; } } public static void main(String[] args) { op_bulan op=new op_bulan(); op.Show(); // TODO code application logic here } }
Berikut tampilannya
Semoga bermanfaat
Posting Komentar
Ayo berikan Komentarmu, karena satu komentar dari kamu itu sangat berarti bagi saya (^_^)
« Sebelumnya
Berikutnya »
Copyright © 2013
All Right Reserved
Designed by
Indra Prasetya
Powered by
Blogger
Back to Top