Nested Class, Inner Class
✅ 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...
✅ 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...
✅ String is reference String is reference value can create String as literal or as instance String str1= "hello"; //literal String str2 = new String("hello"); //instance 🟰 two code is...
✅ Summary Immutable: cannot change reference value 1️⃣ final field, 2️⃣ no setter ✅ Primitive 🆚 Reference 🆚 Primitive int a = 10; int b = a; b = 20; ❓ 이제 a의 값은? 여전히 10 ❓ 이제 b의...
✅ Object class Object class is parent of all Java classes highest parent of all Java class 자바의 최상위 부모 클래스 implicitly imports object public class Parent extends Object (extends Obje...
✅ OCP Open for extension: new code should be able to be extended 확장에는 열려있고 Closed for modification: old code must not be modified 변경에는 닫혀있어야 한다 ✅ How t...
✅ Summary interface is like pure abstract class cannot create instance MUST be overrided by child class implements can implements several interface ✅ Interface ...