本文介紹了Java - 將 int 更改為 ascii的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
java有沒有辦法將int轉換為ascii符號?
Is there a way for java to convert int's to ascii symbols?
推薦答案
你想把 int
s 轉換成 char
s 嗎?:
Do you want to convert int
s to char
s?:
int yourInt = 33;
char ch = (char) yourInt;
System.out.println(yourInt);
System.out.println(ch);
// Output:
// 33
// !
還是要將 int
s 轉換為 String
s?
Or do you want to convert int
s to String
s?
int yourInt = 33;
String str = String.valueOf(yourInt);
或者你的意思是什么?
這篇關于Java - 將 int 更改為 ascii的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!