Delta_Sierra

SwitchExpression

Oct 16th, 2025
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.48 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class PlateCodingChecker {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.         System.out.print("Enter the plate number (e.g., ABC 1234): ");
  7.         String plateNumber = scanner.nextLine().trim();
  8.  
  9.         char lastChar = plateNumber.charAt(plateNumber.length() - 1);
  10.  
  11.         int lastDigit = lastChar - '0';
  12.        
  13.         String codedDay = "";
  14.        
  15.         scanner.close();
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment