Advertisement
jwrbg

Untitled

Jan 11th, 2019
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. // Declare a variable
  2.  
  3. char symbol = 'a';
  4.  
  5. // Print the result ot the console
  6.  
  7. System.out.println(
  8.  
  9. "The code of '" + symbol + "' is: " + (int) symbol);
  10.  
  11. symbol = 'b';
  12.  
  13. System.out.println(
  14.  
  15. "The code of '" + symbol + "' is: " + (int) symbol);
  16.  
  17. symbol = 'A';
  18.  
  19. System.out.println(
  20.  
  21. "The code of '" + symbol + "' is: " + (int) symbol);
  22.  
  23. Нека видим резултата от горния фрагмент код отдолу:
  24.  
  25. The code of 'a' is: 97
  26.  
  27. The code of 'b' is: 98
  28.  
  29. The code of 'A' is: 65
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement