import javax.swing.JOptionPane;
public class GetInputFromKeyboard2 {
public static void main (String [] args) {
String nama = JOptionPane.showInputDialog("Masukkan Nama Anda :");
String kelas = JOptionPane.showInputDialog("Masukkan Kelas Anda :");
String nim = JOptionPane.showInputDialog("Masukkan NIM Anda :");
String pesan1 = "Nama : " + nama;
String pesan2 = "Kelas : " + kelas;
String pesan3 = "NIM : " + nim;
JOptionPane.showMessageDialog(null, pesan1 + "\n" + pesan2 + "\n" + pesan3);
}
}
0 comments:
Posting Komentar