Java - Change int to ascii

前端 未结 7 893
迷失自我
迷失自我 2020-12-01 07:32

Is there a way for java to convert int\'s to ascii symbols?

7条回答
  •  既然无缘
    2020-12-01 08:11

    The most simple way is using type casting:

    public char toChar(int c) {
        return (char)c;
    }
    

提交回复
热议问题