arraycopy效率比较

摘要: import java.util.Date;public class TestArrayCopy { public static void main(String[] args) { Date d1 = new Date(); int[] arr = new int[10000000]; for(int i = 0; i < 10000000; i++) { arr[i] = i; } Date d2 = new Date(); System.out.println(d2.getTime() - d1.getTime()); int[] arr2 = new ... 阅读全文
posted @ 2012-08-07 14:48 Yours风之恋 阅读(157) 评论(0) 推荐(0)

关于动态数组的问题

摘要: import java.util.Scanner;import java.util.regex.Pattern;public class TestBubbleSort { public static void main(String[] args) { Scanner sc = new Scanner(System.in); boolean flag = true; String input = null; int[] array = new int[10]; int len = 0; while(flag) { input = sc.next(); if(Ge... 阅读全文
posted @ 2012-08-07 14:17 Yours风之恋 阅读(130) 评论(0) 推荐(0)