출처: https://bumcrush.tistory.com/182 [맑음때때로 여름]

 

ParseInt

String > int

1
2
3
4
5
6
         int num;
         String s = "4";
         
         num = Integer.parseInt(s);
         System.out.println(num);
         
cs

 

toString

int > String

1
2
3
        int s=140;
        String str=Integer.toString(s);
        System.out.println(str);
cs

+ Recent posts