字符串和字符數組的相互轉換

字符串和字符數組的相互轉換 字符串轉換成字符數組 String str = 「Hello」; char[] c = str.toCharArray(); System.out.println(Arrays.toString(chars));//[H, e, l, l, o] 字符數組轉換成字符串 char[] c = {'1','2','3'}; String str = new String(c
相關文章
相關標籤/搜索