-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAarrayListTest.java
More file actions
33 lines (29 loc) · 858 Bytes
/
Copy pathAarrayListTest.java
File metadata and controls
33 lines (29 loc) · 858 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package com.java;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
public class AarrayListTest {
/*public static void main(String[] args) {
List<String> list = new ArrayList<String>();
for(int i=0;i<10;i++){
list.add("TEST" + i);
}
list.add(7, "Vimal");
list.add(7, "TEST7");
System.out.println(list.toString());
}*/
Map<String,List<Integer>> x = new TreeMap<> ();
public static void main(String[] args) {
ArrayList<ArrayList<Integer>> array =
new ArrayList<ArrayList<Integer>>();
for(int i=0; i<10000; i++) {
try {
array.add(new ArrayList<Integer>(1000000));
} catch (OutOfMemoryError e) {
System.out.println(i);
break;
}
}
}
}