Method
Kode Program : package bahasa_pemrograman_1; import java.util.*; public class Method { static int harga[] = new int[19]; static int hitungharga(int hargasatuan, int jumlah){ int harga = hargasatuan*jumlah; return harga; } static String[] sort(String[] menu){ for(int i=0; i<menu.length; i++){ for(int j=0; j<menu.length-1; j++){ if(menu[j].compareToIgnoreCase(menu[j+1]) > 0){ String t = menu[j]; menu[j] = menu[j+1]; menu[j+1] = t; int h = harga[j]; harga[j] = harga[j+1]; harga[j+1] = h; } } } return menu; } static String[][] search(String[] makanan, int harga[], String cari){ String[][] hasil = new String[9][9]; int index = 0; for(int i=0; i<makanan.length; i++){