Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
Binary file added newFolder/.DS_Store
Binary file not shown.
18 changes: 18 additions & 0 deletions newFolder/DemoChar.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*******************************
* Author: Daniel Longman
* Demo the use of characters
*****************************/

public class DemoChar {
public static void main(String[] args) {
String title = "Demo Char:";
System.out.printf("%S%n", title); // %S prints uppercase text

char initial = 'D';
System.out.printf("Initial: %c %d U+%04X %n",
initial, (int)initial, (int)initial);

char colon = '\u003A';
System.out.println("colon: " + (int)colon);
}
}