What does this Math.random() > 0.5;
mean in boolean
?
Here is an example:
class Pro {
public static void main(String[] args) {
int numero = 10;
boolean[] array = new boolean[numero];
for(int i= 0; i< array.length; i++) {
array[i] = Math.random() > 0.5;
System.out.print(array[i] + "\t");
}
}
}