Created
October 3, 2022 21:25
-
-
Save rmg007/b17b93e8d13d599fe2dcf971703b473e to your computer and use it in GitHub Desktop.
learn and dive deep into Java. char Data Type lecture
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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