random () can give values ββclose to 1, however they will always be LESS than 1. Here we are talking about casting to (int) from a positive double. The result will always be less than 6, changing in the set {0,1,2,3,4,5}. So the answer is NO, none, nor can there still be 7. I hope this helps.
To prove, run the following code:
double x = 0.99;
System.out.println ((int) (6 * x));
Play with the value of x, no matter how close it is to 1, you will still get 5 or less fingerprints.
source share