/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package biodata;
import com.sun.xml.internal.ws.developer.JAXWSProperties;
import javax.swing.JOptionPane;
/**
*
* @author DOA
*/
public class contohHitungJoption {
public static void main(String[] args) {
String angka1=JOptionPane.showInputDialog("Masukkan Angka pertama?");
int angka2=Integer.parseInt(angka1);
String angka3=JOptionPane.showInputDialog("Masukkan Angka kedua?");
int angka4=Integer.parseInt(angka3);
int hitung=angka2+angka4;
JOptionPane.showMessageDialog(null, "Hasil = " +hitung);
}
}
- Home Unlabelled Contoh Penggunaan Inputan JoptionPane dalam perhitungan







No comments:
Post a Comment