Berikut source code nya:
/*
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package binarysearch;
import javax.swing.JOptionPane;
/**
*
* @author MACHAAPIEDH
*/
public class BinarySearch {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
int angka;
int [] numb = new int [6];
int key =Integer.parseInt(JOptionPane.showInputDialog("masukkan angka :"));
System.out.println("key ="+key);
System.out.println("inputan angka");
for (int i=0; i<numb.length;i++){
angka = Integer.parseInt(JOptionPane.showInputDialog("masukkan angka ke-"+(i+1)+"."));
numb [i]=angka;
System.out.print(angka+" ");
}