* tests/gc/New.java: Added testcase.
authormichi <none@none>
Mon, 2 Apr 2007 20:44:25 +0000 (20:44 +0000)
committermichi <none@none>
Mon, 2 Apr 2007 20:44:25 +0000 (20:44 +0000)
--HG--
branch : exact-gc

tests/gc/New.java [new file with mode: 0644]

diff --git a/tests/gc/New.java b/tests/gc/New.java
new file mode 100644 (file)
index 0000000..6ca238f
--- /dev/null
@@ -0,0 +1,18 @@
+public class New {
+       public static final int N=1000000;
+       public static final String TEMPLATE="I am simply a space filler";
+
+       public static void main(String args[]) {
+               String s;
+
+               System.out.println("Creating lots of Strings ...");
+               s = null;
+               for (int i=0; i<N; i++) {
+                       s = new String(TEMPLATE);
+               }
+
+               System.out.println("The String was: \'" + s + "\'");
+
+               System.out.println("done.");
+       }
+}