Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Declare a variable
- char symbol = 'a';
- // Print the result ot the console
- System.out.println(
- "The code of '" + symbol + "' is: " + (int) symbol);
- symbol = 'b';
- System.out.println(
- "The code of '" + symbol + "' is: " + (int) symbol);
- symbol = 'A';
- System.out.println(
- "The code of '" + symbol + "' is: " + (int) symbol);
- Нека видим резултата от горния фрагмент код отдолу:
- The code of 'a' is: 97
- The code of 'b' is: 98
- The code of 'A' is: 65
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement