public void writeStatistics(){
        try{
            BufferedWriter writer = new BufferedWriter(new FileWriter(Maximums,true));
            for (int i=0;i < iterationsLimit;++i){
                for (int j=0;j<2;++j){
                    writer.write(dataMax[i][j] + " ");
                    writer.flush();
                }
                writer.newLine();
            }
            writer.close();

            writer = new BufferedWriter(new FileWriter(Minimums,true));
            for (int i=0; i< iterationsLimit; ++i){
                for (int j=0;j<2 ;++j){
                    writer.write(dataMin[i][j] + " ");
                    writer.flush();
                }
                writer.newLine();
            }
            writer.close();
            writer = new BufferedWriter(new FileWriter(Average,true));
            for (int i=0;i<iterationsLimit;++i){
                for (int j=0;j<2;++j){
                    writer.write(dataAvg[i][j] + " ");
                    writer.flush();
                }
                writer.newLine();
            }
            writer.close();

        }
        catch (IOException e) {
            System.out.println("IOEXCEPTION occured");
        }
    }