This is the code I'm using from this examplesdepot website:
code: |
// Create a list
List list = new ArrayList();
// Add elements to list
// Shuffle the elements in the list
Collections.shuffle(list);
// Create an array
String[] array = new String[]{"a", "b", "c"};
// Shuffle the elements in the array
Collections.shuffle(Arrays.asList(array));
|
So in order to use ArrayList, I importt java.util.*, then it says, "Type List is imported on demand from java/awt and java/util.".
Then I changed the import to java.util.ArrayList, then it says "you cannot assign a "java.util.ArrayList" expression to a "java.awt.List" variable."
