Coding :
import java.util.Scanner;
import javax.swing.JOptionPane;
public class ExceptionTest{
public static void main(String[] argas){
Scanner input=new Scanner(System.in);
String input1str=input.next();
int input1=Integer.parseInt(input1str);
System.out.println(input1);
int input2=input.nextInt();
System.out.println(input2);
String s=JOptionPane.showInputDialog("apakah rizal ganteng?");
if(s.equals("iya dong"))
JOptionPane.showMessageDialog(null,"pinter....");
else
JOptionPane.showMessageDialog(null,"bagus");
}
}
Hasil ny :
No comments:
Post a Comment