String []frequencey(double array[]){ // find mode.
        int [][]tools = new int[array.length][2];
        String shed[] = new String [2];
        double []check = array;
        int big = 0;
        ArrayList<Integer> counter = new ArrayList<Integer>();
        int count  = 0;

        for (int i = 0; i < array.length; i++) {
            for (int j = 0; j < check.length; j++) {
                if(array[i] == check[j]){
                    count++;
                }


            }//counter.add(count); count =0;
            tools[i][0] = count;
            tools[i][1] = i;
            //big = tools[0][0];
            if(i > 0){
                if(tools[i-1][0]< tools[i][0]){
                    big = tools[i][0];
                    shed[1] = Integer.toString(tools[i][1]);
                }
            }
            count =0;
        }

//        int largest= tools[0][0];
//        for (int i = 0; i < tools.length; i++) {
//            if(largest< tools[i][0]){
//                largest = tools[i][0];
//            }
//        }

        shed[0] = Integer.toString(big);
//        for (int i = 0; i < tools.length; i++) {
//            if(big== tools[i][0]){
//                shed[1] = Integer.toString(tools[i][1]);
//            }
//        }
        shed[1] = Double.toString(array[Integer.parseInt(shed[1])]);
        return shed;
    }