Welcome to the Ranch
I suggest you avoid Math.random(). I know the Java® Tutorial say it is more convenient than a Random instance, but I am not convinced. Using the
nextInt method is more robust than the (int) cast.
You should mark all method called from the constructor private or final; there is some discussion about that problem
here.
Never write == true or == false. Not
if (b == true) ... but
if (b) ...
Not
if (b == false) ... but
if (!b) ...
Using == is error‑prone; we see people who write = by mistake.
Don't write
if (...) return true; else return false;
You should write
You can simplify the method which returns the array
Now you no longer need the array field at all.
What you are getting back from the printing call is determined by the toString method which you wrote. It is confusing because you don't say what the numbers mean. If you wrote this as your toString method, it would be easier to understand:-
That will give a very similar output to
"A " + nsides + "-sided die showing " + value + "."