public void storeCredit() throws IOException {

        int totalInputs = Integer.parseInt(fileReader.nextLine());
        Map<String, ArrayList<Integer>> keyValue = new HashMap<String, ArrayList<Integer>>();
        int i = 1;

        while (fileReader.hasNext()) {

            int credit = Integer.parseInt(fileReader.nextLine());
            int totalNumberOfArrayElements = Integer.parseInt(fileReader.nextLine());
            StringTokenizer stringTokenizer = new StringTokenizer(fileReader.nextLine());
            List<String> keyList = new ArrayList<String>();
            Integer index = 1;
            ArrayList<Integer> indices;
            while (stringTokenizer.hasMoreElements()) {
                String element = stringTokenizer.nextToken();
                keyList.add(element);
                if(keyValue.get(element)==null){
                    indices = new ArrayList<Integer>();
                    indices.add(index);
                    keyValue.put(element,indices);
                }
                else{
                    indices = keyValue.get(element);
                    indices.add(index);
                    keyValue.put(element,indices);
                }
                index++;
            }
            for (String integer : keyList) {
                int temp = credit-Integer.parseInt(integer);
                if (keyValue.get(String.valueOf(temp)) != null) {
                    if (i == totalInputs) {
                        if(Integer.parseInt(integer) == temp)
                            fileWriter.append("Case #" + i + ": " + min(keyValue.get(String.valueOf(integer)).get(0),keyValue.get(String.valueOf(temp)).get(1)) + " " + max(keyValue.get(String.valueOf(integer)).get(0),keyValue.get(String.valueOf(temp)).get(1)));
                        else
                            fileWriter.append("Case #" + i + ": " + min(keyValue.get(String.valueOf(integer)).get(0),keyValue.get(String.valueOf(temp)).get(0)) + " " + max(keyValue.get(String.valueOf(integer)).get(0),keyValue.get(String.valueOf(temp)).get(0)));
                        break;
                    }
                    if(Integer.parseInt(integer) == temp)
                        fileWriter.append("Case #" + i + ": " + min(keyValue.get(String.valueOf(integer)).get(0),keyValue.get(String.valueOf(temp)).get(1)) + " " + max(keyValue.get(String.valueOf(integer)).get(0),keyValue.get(String.valueOf(temp)).get(1)) + "\n");
                    else
                        fileWriter.append("Case #" + i + ": " + min(keyValue.get(String.valueOf(integer)).get(0),keyValue.get(String.valueOf(temp)).get(0)) + " " + max(keyValue.get(String.valueOf(integer)).get(0),keyValue.get(String.valueOf(temp)).get(0)) + "\n");
                    break;
                }
            }
            i++;
        }
        fileReader.close();
        fileWriter.close();
    }