Map
✅ Map key ➕ value key: unique value: duplication possible no order ☑️ HashMap key ➕ value add, search value: O(1) no order get all: random O(1) must override hashCode() an...
✅ Map key ➕ value key: unique value: duplication possible no order ☑️ HashMap key ➕ value add, search value: O(1) no order get all: random O(1) must override hashCode() an...
List 🆚 Set List: duplication⭕️, index⭕️, used for order Set: duplication❌, no index ❌, used for search ✅ Set uniqueness, no duplication no order, no index fast search ✅ Hash 👍...
✅ Array 👍🏻 use index and input, change, get value: O(1) 배열에는 index가 있기 때문에 👎🏻 search, insert value: O(n), need to search, compare the whole array, 👎🏻 array size is f...
✅ Generic 사용할 타입을 미리 결정하지 않는다, type parameter 결정을 미루기 클래스 생성할 때 타입을 결정하지 않고, 인스턴스 생성 때 타입 결정 when creating class: use type parameter <T> when creating instance: set type when cre...
✅ Why do we need Exception class? 정상 흐름과 예외 흐름을 따로 분리하기 위해 👎🏻 before connect -> send - disconnect하는 코드라면 정상 흐름과 예외 흐름이 섞여서 이 코드가 도대체 어떤 순서로 무엇을 하는지 알기가 어려움 client.initError...
✅ Nested Class class with class inside ✔️ Types of nested class 1️⃣ Static nested class Non-static nested class 2️⃣ Inner class 3️⃣ Local class 4️⃣ Anonymou...
✅ LocalDateTime 👍🏻 get time of my local area LocalDate: 2023-11-21 LocalTime: 00:20:30.234 LocalDateTime: LocalDate + LocalTime, 2023-11-21T00:20:30.234 now() LocalDat...
👎🏻 Limit of Primitive type 1️⃣ primitive type is not an instance cannot use collection framework 2️⃣ cannot use null 👍🏻 Advantage of primitive type: faster than wrapper type ✅ W...
✅ Why do we need Enum? Limit field to certain value User role can be only BASIC, GOLD, DIAMOND 👎🏻 how can we prevent entering basiiiic(오타) or diamond(소문자) or VIP(존재하지 않는 값)? 💊 ENU...
✅ Class 클래스 Class 클래스를 통해서 get metadata about a class 할 수 있다 ✔️ get class type information: class name, super class, interface, access modifier… ✔️ reflection: get field, method, co...