Advertisement
petur_stoqnov

Untitled

Apr 3rd, 2021
645
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.21 KB | None | 0 0
  1. public class test {
  2.     public static void main(String[] args) {
  3.         char myChar = 'a';
  4.         int  i = (int) myChar; // cast from a char to an int
  5.         System.out.println ("ASCII value - " + i);
  6.     }
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement