The ASCII value of a is 97.

When i = 0, i + 'a' = 0 + 97 => When cast into char, it will be a
When i = 1, i + 'a' = 1 + 97 => When cast into char, it will be b
When i = 2, i + 'a' = 2 + 97 => When cast into char, it will be c
...and so on
Answer from Arvind Kumar Avinash on Stack Overflow
🌐
W3Schools
w3schools.com › java › java_data_types_characters.asp
Java Data Types Characters
Java Examples Java Videos Java Compiler Java Exercises Java Quiz Java Code Challenges Java Practice Problems Java Server Java Syllabus Java Study Plan Java Interview Q&A ... The char data type is used to store a single character.
🌐
Oracle
docs.oracle.com › javase › tutorial › java › data › characters.html
Characters (The Java™ Tutorials > Learning the Java Language > Numbers and Strings)
There are times, however, when you need to use a char as an object—for example, as a method argument where an object is expected. The Java programming language provides a wrapper class that "wraps" the char in a Character object for this purpose. An object of type Character contains a single field, whose type is char.
🌐
Software Testing Help
softwaretestinghelp.com › home › java › java char data type: syntax, range and examples
Java char - Character Data Type In Java With Examples
March 25, 2021 - To declare a char variable, you have to use char keyword followed by the variable name. You can assign its value as follows: Java // Declaration only char letter; // Declaration with initialization char grade = 'A'; char symbol = '#'; char digit ...
🌐
CodeGym
codegym.cc › java blog › java types › char data type in java
Char Data Type in Java
April 24, 2025 - The char data type in Java is a primitive type that holds a single character, like a letter, digit, or symbol. It's stored in 16 bits (2 bytes), unlike some languages that use 8 bits, giving it room for 65,536 possible values
🌐
Tutorialspoint
tutorialspoint.com › java › java_characters.htm
Java - Character Class
In order to achieve this, Java provides wrapper class Character for primitive data type char.
🌐
W3Schools
w3schools.com › java › ref_keyword_char.asp
Java char Keyword
A char value must be surrounded by single quotes, like 'A' or 'c'. Read more about data types in our Java Data Types Tutorial.
🌐
GeeksforGeeks
geeksforgeeks.org › java › character-class-java
Character Class in Java - GeeksforGeeks
January 23, 2026 - The Character class in Java, available in the java.lang package is a wrapper class used to represent a single char value as an object.
Find elsewhere
🌐
iO Flood
ioflood.com › blog › java-char
Char Data Type in Java: How to Declare and Use
February 26, 2024 - This is a basic way to declare and use a char in Java, but there’s much more to learn about working with chars in Java. Continue reading for more detailed information and advanced usage scenarios. ... In Java, the char keyword is used to declare a character variable.
🌐
Medium
amn24.medium.com › java-day-12-fbda745dd919
Java Day_12. Java Notes: Character Literals (char) | by Aman Verma | Medium
September 29, 2025 - You can represent a char using its 4-digit hexadecimal Unicode value. ... XXXX: Represents exactly four hexadecimal digits. ... The decimal Unicode value for ‘A’ is 65. ... Reading the remainders from bottom to top gives 41. The hexadecimal representation must be 4 digits, so we pad it with leading zeros: 0041. Combine with the \u prefix and enclose in single quotes. ... Java provides special backslash (\) literals, known as escape sequences, to represent non-printable or special characters.
🌐
Runestone Academy
runestone.academy › ns › books › published › javajavajava › character-dataand-operators.html
Java, Java, Java: Object-Oriented Problem Solving, 2024E
In other words, when is a character, ... a character literal — ‘a’ or ‘A’ or ‘0’ or ‘?’ — is always treated as a character, unless we explicitly tell Java to treat it as an integer....
🌐
Dremendo
dremendo.com › java-programming-tutorial › java-character-variable
Character Variable in Java Programming | Dremendo
A Character variable in Java programming can store any single character enclosed within single quotes. To declare a variable of type Character we use the keyword char, which is pronounced as ‘kar’.
🌐
Wikibooks
en.wikibooks.org › wiki › Java_Programming › Keywords › char
Java Programming/Keywords/char - Wikibooks, open books for an open world
Character literals consist of a single quote character (') (ASCII 39, hex 0x27), a single character, and a close quote ('), such as 'w'. Instead of a character, you can also use unicode escape sequences, but there must be exactly one. ... The nominal wrapper class is the java.lang.Character class when you need to store a char value but an object reference is required.
🌐
Ktbyte
ktbyte.com › java-tutorial › book › strings-and-chars
Interactive Algorithms Textbook in Java: Strings And Chars
Internally, Strings are actually arrays of characaters. However, in Java, we cannot use square brackets to get a single character out of a String. Instead, if we wanted the first character in "Hello" (the 'H'), we would use the expression "Hello".charAt(0). The second character would be "Hello".charAt(1), and the last character would be "Hello".charAt(hello.length()-1).
🌐
Oracle
docs.oracle.com › javase › 7 › docs › api › java › lang › Character.html
Character (Java Platform SE 7 )
Java™ Platform Standard Ed. 7 ... The Character class wraps a value of the primitive type char in an object.
🌐
Oracle
docs.oracle.com › javase › 8 › docs › api › java › lang › Character.html
Character (Java Platform SE 8 )
September 23, 2026 - Java™ Platform Standard Ed. 8 ... The Character class wraps a value of the primitive type char in an object.
🌐
freeCodeCamp
freecodecamp.org › news › charat-in-java-how-to-use-the-java-charat-method-2
charAt() in Java – How to Use the Java charAt() Method
March 31, 2022 - The charAt() method in Java returns the char value of a character in a string at a given or specified index. In this article, we'll see how to use the charAt() method starting with it's syntax and then through a few examples/use cases.
🌐
Baeldung
baeldung.com › home › java › core java › convert between int and char in java
Convert Between int and char in Java | Baeldung
January 16, 2024 - We’ll briefly discuss how characters are represented in order to better understand the code we’ll see later in the article. Internally, Java stores each char as a 16-bit Unicode encoded value: