@@ -0,0 +1,639 @@
+import java.util.Scanner;%0A%0Apublic class AllocatingArrays %7B%0A%0A%09public static void main(String%5B%5D args) throws InterruptedException %7B%0A%0A%09%09Scanner s = new Scanner(System.in);%0A%09%09System.out.println(%22Type something to continue...%22);%0A%09%09s.nextLine();%0A%09%09%0A%09%09System.out.println(%22Allocating...%22);%0A%09%09%0A%09%09// giga is 10%5E9%0A%09%09// an int is 32 bits, which is 4 bytes.%0A%09%09// 10%5E9 / 4 is about how many gigs it will take up.%0A%09%09int toAlloc = (int)Math.pow(10, 9) / 4;%0A%09%09int %5B%5D ints = new int %5BtoAlloc%5D;%0A%09%09%0A%09%09System.out.println(%22Sleeping%22);%0A%09%09%0A%09%09// what happens when we null the ref?%0A%09%09ints = null;%0A%09%09%0A%09%09Thread.sleep(60000);%0A%09%09%0A%09%09System.out.println(%22Done...%22);%0A%09%7D%0A%0A%7D%0A

Create AllocatingArrays.java