Immutable
✅ 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의...
✅ 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 ...
✅ Abstract class Parent class, but can NOT be created as instance 동물이라는 개념 안에 강아지, 고양이 등이 있지만 "동물"이라고 하는 동물은 없음 따라서 동물은 인스턴스를 생성하면 안 됨 Animal class: abstract class Dog class, Ca...
⭐️ extends ⭐️ method overriding ✅ Polymorphism: parent can become child parent class child class extends parent class 1️⃣ Polymorphism: parent CAN become child instance child CAN N...
✅ Final final: can not change after initialization final value can not be altered after initializatoin 처음 값 할당 후에는 변수의 값을 변경하지 못하게 막아버린다 👎🏻 without final int data0; data0 = 10; ...
✅ Extends if extends, extends the field and method of parent class public class Car { public void move(){} } public class GasCar extends Car{ public void fillGas(){} } public class...
✅ Method, Stack, Heap ✔️ Method class ✔️ Stack methods program is run ✔️ Heap Instance created new class instance, array 💡 Method shared data to run program class...
✅ What does access modifier do? Allow access or hide class, field, constructor, method from outside class/package Developer should not change speaker volume outside speaker class ...