java_WrapperClass

기억저장소·2023년 2월 3일
0

JAVA

목록 보기
5/5

기본형 Wrapper Class( 포장, 클래스화)


boolean             Boolean
char                  Character
bytenbsp            Byte
short                  Short
int                     Integer
longint                 Long
floatint                 Float
doubleint             Double

클래스화를 할것인지 기본형으로 할 것인지
AutoBoxing
unAutoBoxing

int e = 5;
	Integer f = e;	// JDK5.0 , AutoBoxing
	//객체형   = 기본형```


Integer f = new Integer(e); // JDK5.0이전 (deprecate, error 발생하진 않지만 쓰지않아야 한다.)

0개의 댓글