반응형 변환1 [Java] 변환 1. 문자열을 정수로 변환 parseInt() 메서드 1 2 3 4 5 6 7 8 public class StringToIntExample { public static void main(String[] args) { String strNumber = "12345"; int number = Integer.parseInt(strNumber); System.out.println(number); // Output: 12345 } } cs 2. 정수를 문자열로 변환 String.valueOf() 메서드 1 2 3 4 5 6 7 8 public class IntToStringExample { public static void main(String[] args) { int number = 12345; String s.. 2023. 8. 16. 이전 1 다음 반응형