Skip to content

Instantly share code, notes, and snippets.

@rmg007
Created October 3, 2022 21:25
Show Gist options
  • Select an option

  • Save rmg007/b17b93e8d13d599fe2dcf971703b473e to your computer and use it in GitHub Desktop.

Select an option

Save rmg007/b17b93e8d13d599fe2dcf971703b473e to your computer and use it in GitHub Desktop.
learn and dive deep into Java. char Data Type lecture
public class Main {
/*
letter A
decimal value 65
unicode value U+0041
*/
public static void main(String[] args) {
char myChar = 'A';
myChar++;
myChar++;
System.out.println(myChar);
int myChar2 = 65;
System.out.println(myChar2);
System.out.println((char)myChar2);
System.out.println((char)66);
System.out.println('\u0041');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment