JAVA/Java 문법

    Wrapper Class

    Wrapper Class? 자바의 자료형은 primitive type과 reference type으로 나뉜다. - primitive type : char, int, float, double, boolean 등 - reference type : class, interface 등 기본 자료타입(primitive type) 데이터를 객체(Object)로 표현해야 할 때 객체로 다루기 위해 사용하는 클래스를 wrapper class라고 한다. Wrapper Class 구조도 Wrapper Class를 사용하는 이유 기본 데이터 타입(primitive type)을 Object로 변환할 수 있다. parse + 기본 타입명을 이용해 문자열을 기본 타입 값으로 변환할 때 사용된다. java.util 패키지의 클래스는..

    [Java] ArrayList와 List의 차이

    [Java] ArrayList와 List의 차이

    ArrayList와 List의 차이 Arraylist Resizable-array implementation of the List interface. Implements all optional list operations, and permits all elements, including null. In addition to implementing the List interface, this class provides methods to manipulate the size of the array that is used internally to store the list. List An ordered collection (also known as a sequence). The user of this inte..