1import java.util.Random;
2
3public class RandomChar {
4 public static void main(String[] args) {
5 Random random = new Random();
6
7 char randomizedCharacter = (char) (random.nextInt(26) + 'a');
8 System.out.println("Generated Random Character: " + randomizedCharacter);
9
10 }
11
12}
13
1import java.util.*;
2class randomChar
3{
4public static void main(String str[])
5{
6Random r=new Random();
7int count=r.nextInt(26);
8char ch=(char)(count+'a');
9if((char)count+'a'==ch)
10{
11System.out.println(ch);
12}
13}
14}
1import java.util.Random;
2
3public class RandomChar {
4 public static void main(String[] args) {
5 Random random = new Random();
6
7 char randomizedCharacter = (char) (random.nextInt(26) + 'a');
8 System.out.println("Generated Random Character: " + randomizedCharacter);
9
10 }