In this step, we will create a user input example that allows the user to enter a char array, an index, and a limit, and displays the code point of the character at the given index within the limit.
Scanner scanner = new Scanner(System.in);
System.out.print("Enter char array: ");
String input = scanner.nextLine();
char[] arr2 = input.toCharArray();
System.out.print("Enter index: ");
int index2 = scanner.nextInt();
System.out.print("Enter limit: ");
int limit2 = scanner.nextInt();
int codepoint3 = Character.codePointAt(arr2, index2, limit2);
System.out.println("Code point at index " + index2 + " within limit " + limit2 + " is " + codepoint3);