scanner using set fixed no of character only print in java code example
Example: nextchar in java
Scanner scanner = new Scanner(System.in);
char ch = scanner.next().charAt(0);
Scanner scanner = new Scanner(System.in);
char ch = scanner.next().charAt(0);