Hello and thank you for reading this. I have written code that fills a 2d triangular array, but it only fills with lower case letters. How do I get it to also fill with uppercase letters?
Here is a small part of the code:
public static void fillSpecialMatrice(char[][] matrice) {
Random random = new Random();
for(int i = 0; i < matrice.length; i++) {
for(int j = 0; j < matrice.length-i; j++) {
matrice[i][j] = (char) (random.nextInt(26) + 'a');
}
}
}
How the triangular matrix looks when printed: