一般的なデータ型間の変換


String回転int(Stringの文字列は数字でなければならない)方式1
String s ="12345";
int a= Integer.parseInt(s);

方式2
String s ="1234";
int b = Integer.valueOf(s).intValue();

String—int[]
String s ="12345";
int [] arr = new int[s.length()];
for (int k = 0; k < s.length(); k++) {
       arr[k]=Integer.parseInt(String.valueOf(s.charAt(k)));
         System.out.println(arr[k]);
        }

String — char[]
String s ="asdfhsak";
char c=s.toCharArray();
for (int k = 0; k < c.length; k++) {
            System.out.println(c[k]);
        }

int-String方式1
int a = 1700;
String s=String.valueOf(a);

方式2
int a =3200;
String s= a+"";

int[] —String
int [] arr ={1,2,3,4,5};
String s =arr.toString();

char[]–String
char [] c={'q','s','c','m'};
String s =String,valueOf(c);