How to convert ASCII code to character in Java

1 Answer

0 votes
public class MyClass {
    public static void main(String args[]) {
        int asciiCode = 97;
        
        char character = (char)asciiCode;
        
        System.out.println(character);
    }
}
 
 
 
 
/*
run:
 
a

*/

 



answered Nov 6, 2023 by avibootz

Related questions

...