Java convert from int to char using ASCII?

Java convert from int to char using ASCII?

瀏覽:1493
日期:2026-04-22
You can add 48 to the numeric char d = (char)(digit + 48); that would be the ASCII way or You can add char '0' char dd = '0' + digit; // here is both ways public class IntToChar { public static void main(String[] arg) { int[] nums = {3, 4, 44, 78}; for (i...看更多