Answers for "java generate random letter or number"

1

create a random char java

import java.util.Random;

public class RandomChar {
    public static void main(String[] args) {
        Random random = new Random();

        char randomizedCharacter = (char) (random.nextInt(26) + 'a');
        System.out.println("Generated Random Character: " + randomizedCharacter);

    }

}
Posted by: Guest on April-17-2021

Code answers related to "java generate random letter or number"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language