< Wrapper 클래스 >
기본형변수 ======> 참조형변수
boolean Boolean
char Character
int Integer
long Long
float Float
byte Byte
short Short
double Double
기본형은 끽해야 연산자나 사용가능. 매우 가난하다.
=>기본형변수로는 사용할 수 없는 기능이 있을때,
Wrapper 클래스 (참조형변수)로 만들어서 => 메소드(기능) 사용!
int.parseint( ) (X)
"기본형주제에! 래퍼클래스 데려와."
Integer.parseInt( ) 문자 => int화
Integer.toString( ) int =>문자화
Double.parseDouble( )
Double.toString( )
'Back to the Java' 카테고리의 다른 글
날짜 시간 / Date => Calendar + SimpleDateFormat => LocalDate (0) | 2022.07.04 |
---|---|
DecimalFormat 출력 포맷 맞추기 (0) | 2022.07.04 |
System 클래스 / Class 클래스 (0) | 2022.07.04 |
String 메소드 / subString / charAt / split / contains / indexOf / matches / Tokeni (0) | 2022.07.04 |
Exception 예외처리 / try-catch / throws / throw는 생성 (0) | 2022.07.01 |