Topics Index

Datatypes > Primtive Dataypes >
Siva Nookala - 23 Aug 2016
A character type (typically called "char") may contain a single letter, digit, punctuation mark, symbol, formatting code, control code, or some other specialized code (e.g., a byte order mark).

Java Characters

Characters can be created using the keyword char and they are 2-bytes or 16-bits in size. The characters are internally considered as integer and every character is given a integer code. These codes are also called as ASCII codes.

Few examples of ASCII codes are 65 for A, 80 for P, 35 for #, 118 for v, 9 for tab, 13 for carriage return etc., Multiple characters can be combined to form words, names or any other strings like Apple, walk, Rajesh, Alan, DDT, news etc.,

Please see Character Literals In Java for more details on how we can use characters.

Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App