Mencari Nilai Terbesar Dengan JOptionPane
December 31, 2009
Leave a comment
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package TugasModule5;import javax.swing.JOptionPane;
/**
*
* @author Arin
*/
public class MencariNilaiTerbesarJOptionPane {public static void main(String[] args) {
int angka[] = new int[10];
int x = 0, z = 0;
String y = “”;for (x = 0; x < 10; x++) {
y = JOptionPane.showInputDialog("Masukkan angka ke " + (x + 1) + ": ");
angka[x] = Integer.parseInt(y);
}
Read more…
Categories: Array, Java Programming
Java, Java Programming, JOptionPane, OOP, Source Code

Recent Comments