-
--- temp/c0346a66a58997920dd08d0f42a14cc6_1173328903.diff1 2007-03-08 04:41:000 +0000
-
+++ temp/c0346a66a58997920dd08d0f42a14cc6_1173328903.diff2 2007-03-08 04:41:000 +0000
-
@@ -16,8 +16,26 @@
-
System.out.println(back);
-
-
//does not compile
-
- //String[] list = v.toArray();
-
+ //String[] list1 = v.toArray();
-
//compiles, but doesnt run
-
- //String[] list = (String []) v.toArray();
-
+ //String[] list2 = (String []) v.toArray();
-
+ //this appears to work though
-
+ String[] list3 = new String[v.size()];
-
+ v.toArray(list3);
-
+ //and this is it on one line
-
+ String[] list4 = (String[]) v.toArray(new String[v.size()]);
-
+
-
+ //looping way to do it
-
+ String[] list5 = new String[v.size()];
-
+ for (int i = 0; i < v.size(); i++){
-
+ list5[i] = (String) v.get(i);
-
+ }
-
+
-
+ //debug printouts
-
+ //for (int i = 0; i < list1.length; i++){System.out.println(list1[i]);}
-
+ //for (int i = 0; i < list2.length; i++){System.out.println(list2[i]);}
-
+ for (int i = 0; i < list3.length; i++){System.out.println(list3[i]);}
-
+ for (int i = 0; i < list4.length; i++){System.out.println(list4[i]);}
-
+ for (int i = 0; i < list5.length; i++){System.out.println(list5[i]);}
-
}
-
}
-
\ No newline at end of file
-