public static void main(String[] args) {

		ListOps t = new ListOps();
		List<ProductDetails> pList = t.getList();
		List<ProductDetails[]> resultList = new ArrayList<ProductDetails[]>();

		int qty = 3;
		int amt = 150;

		int listCnt = 0;
		while (listCnt <= 5) {
			ProductDetails[] array = new ProductDetails[3];
			int i = 0;
			for (int j = 0; j < pList.size(); j++) {
				array[i] = pList.get(j);
				i++;
				for (int k = 0; k < pList.size(); k++) {
					if(j!=k)
					if (cost(array) + pList.get(k).getPrice() < amt
							&& notExist(array, resultList))
						if (array.length != qty){
							array[i] = pList.get(k);
							i++;
							}
						else {
							resultList.add(array);
							listCnt++;
							break;
						}
				}
			}

		}

	}