import javax.swing.*;
class Juan
{
public static void main(String [] args)
{
int pil;
do
{
pil = Integer.parseInt(JOptionPane.showInputDialog
("---MENU---\n1.Input\n2.Output\n3.Exit"));
switch(pil)
{
case 1:
System.out.println("Anda Pilih 1");
break;
case 2:
System.out.println("Anda Pilih 2");
break;
case 3:
System.exit(0);
break;
default : System.out.println("Pilihan hanya 1, 2, 3");
}
}
while(pil !=3);
}
}
Tidak ada komentar:
Posting Komentar