Cara menghitung dengan banyak JendeLa :
import javax.swing.*;
public class Tugasmell {
public static void main (String [] x){
String y = "";
String z = "";
//Terima Input
y = JOptionPane.showInputDialog ("Input Nilai A");
z = JOptionPane.showInputDialog ("Input Nilai B");
int yy = Integer.parseInt (y);
int zz = Integer.parseInt (z);
//Menampilkan Inputan Penjumlahan
int c = yy + zz ;
int d = yy - zz ;
int e = yy * zz ;
int f = yy / zz ;
JOptionPane.showMessageDialog(null,yy +" + " + zz + " = " + c);
JOptionPane.showMessageDialog(null,yy +" - " + zz + " = " + d);
JOptionPane.showMessageDialog(null,yy +" * " + zz + " = " + e);
JOptionPane.showMessageDialog(null,yy +" / " + zz + " = " + f);
}
}