Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class SomeClass {
- public static void main(String[] args) {
- try (Scanner scanner = new Scanner(System.in)) {
- System.out.println("enter a character and hit <enter> to know its Unicode code point");
- String str = scanner.nextLine();
- int i = str.codePointAt(0);
- System.out.print(str);
- System.out.print(": ");
- System.out.println(i);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement