How to print the extended ASCII code in java from integer value

后端 未结 4 2082
遇见更好的自我
遇见更好的自我 2021-02-19 13:53
public static void main(String[] args) 
{
int i=153;
int j=63;
System.out.println((char)i);
System.out.println((char)j);
}


OUTPUT:-
?
?

I have some i

4条回答
  •  Happy的楠姐
    2021-02-19 14:05

    String iChar = new Character((char)i).toString(); 
    String jChar = new Character((char)j).toString(); 
    
    System.out.println(iChar);
    System.out.println(jChar);
    

提交回复
热议问题