You can shorten the main method to one line:-
I couldn't be bothered to find correct number for your class, but that is hardly a good name for a class. I suppose you have been told to use such names, but if you come back to that code in January, you won't know what any of it means from the class names.
Now that everybody uses Java8, let's see if we can't make your array with a Stream. You should in theory change the getSize() method to return a
long, because the Random method takes a
long as a parameter, but we'll miss that bit out for the time being.
The
Random#ints() method is overloaded; that version returns an
IntStream with the same number of elements as getSize, between 1 and
less than 7, i.e. 1...6. Note the first link I showed you says, “origin (inclusive) and bound (exclusive).” If you subtract 1 from 7 you get 6, which is how many different values you might get.
Now, if you go through the
IntStream documentation, you find it has a method which turns it directly into an array. It will contain exactly the number of elements you put into getSize.
Look carefully at your line 12 and the
Random documentation and work out what sort of range of results you will get from line 12.
Never use
== true or
== false, which are both poor style and error‑prone.
Never
if (b == true) ...
Always
if (b) ...
Never
if (b == false) ...
Always
if (!b) ...
Your line 16 should be changed; so should your line 22, which would be better as
else {