You can fill an array with all values from 1 to 12 and then shuffle them (see e.g. Why does Collections.shuffle() fail for my array?)
More Related Contents:
- Print array without brackets and commas
- I need to create a list that has both colums 1 and 2 equal [closed]
- Does Java JIT compiler sacrifice performance to favor Collections?
- How do I remove repeated elements from ArrayList?
- Arrays.asList() not working as it should?
- Converting ‘ArrayList to ‘String[]’ in Java
- How can I convert List to int[] in Java? [duplicate]
- Array or List in Java. Which is faster?
- How to convert int[] into List in Java?
- How to remove duplicates from a list?
- Convert an array of primitive longs into a List of Longs
- How to convert an Array to a Set in Java
- How to convert a Map to List in Java?
- How can I get the size of an array, a Collection, or a String in Java?
- How to make a new List in Java
- Lambda expression to convert array/List of String to array/List of Integers
- Working with a List of Lists in Java
- Difference between Arrays.asList(array) and new ArrayList(Arrays.asList(array))
- How to pick an item by its probability?
- How to copy Java Collections list
- How to get a reversed list view on a list in Java?
- Is there a no-duplicate List implementation out there?
- Java: how to convert HashMap to array
- Arrays.asList(int[]) not working [duplicate]
- The easiest way to transform collection to array?
- When to use a List over an Array in Java?
- How to create ArrayList (ArrayList) from array (int[]) in Java
- How do I create an int array with randomly shuffled numbers in a given range [duplicate]
- Random element from string array [closed]
- java : Understanding Arrays.asList(T…array) method for primitive types