Like strings, characters in Java are declared using single quotes (‘ ‘). To convert a character to ASCII, you can assign the character to an int variable named “ascii”. Java will internally convert the character value to its corresponding ASCII value. Another way to convert a character to ASCII is by casting the character to an integer using (int).