1public class ProgrammingEx4_25 {
2
3 public static void main(String[] args) {
4 //Randomly picking the letters
5 //ASCII code for A-Z is 65-90
6 char letter1 = (char) ((int)(Math.random()*26+65));
7 char letter2 = (char) ((int)(Math.random()*26+65));
8 char letter3 = (char) ((int)(Math.random()*26+65));
9
10 int numbers = (int)(Math.random()*10000);
11 //Zeros padding using format method
12 String sNumbers = String.format("%04d" ,numbers );
13
14 System.out.println("The plate number is " + letter1 + letter2 +letter3 + sNumbers);
15
16
17 }
18
19}
20