[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/Stackneveroverflow/SortAlgorithms/master/src/Main.java [Back]  [Original]

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Random;

/**
 * Main
 *
 * @author Macer
 * @version V1.1
 * @date 2018/05/05 16:09
 */
public class Main {
    public static void main(String[] args) {
        Integer[] a = new Integer[10000000];
        Random rand = new Random(System.currentTimeMillis());
        // 
        for (int i = 0; i < a.length; i++) {
            a[i] = rand.nextInt(99999999);
        }
        //        
        Integer[][] aa = new Integer[10][a.length];
        for (int i = 0; i < aa.length; i++) {
//            System.arraycopynativeclone()Arrays.copyOf
//            
            System.arraycopy(a, 0, aa[i], 0, a.length);
        }

        try (
                PrintWriter sortResult = new PrintWriter(new FileOutputStream("SortResult.txt"));
        ) {
            SortDemo.print(sortResult, aa);
        } catch (IOException ioe) {
            ioe.printStackTrace();
        }
    }
}

Web Proxy Viewer  |  New URL  |  Original Page