일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- TS
- Spring
- 상속
- xlsx-js-style
- supabase 페이지네이션
- 코드푸시
- array
- react
- 타입스크립트
- javascript
- async
- generic
- extends
- set
- Next.js
- supabase authentication
- 스크롤이벤트
- supabase auth
- app.post
- 페이지네이션
- code-push-standalone
- 글또10기x코드트리
- meatadata
- reactnative
- interface
- codepush
- map
- 슬라이딩윈도우
- 이진탐색
- Filter
- Today
- Total
목록상속 (2)
rhanziy
상속, method overriding을 사용해 햄버거 만들기 package HamBurger; class HamBurger { public String name; public HamBurger() { this("햄버거"); } protected HamBurger(String name) { this.name = name; } public void cook() { System.out.println(this.name + "를 만듭니다."); System.out.println("빵 사이에 들어가는 재료는?"); System.out.println("> 양상추"); System.out.println("+ 패티"); System.out.println("+ 피클"); } } class CheeseBurger exte..
// 옛날방식 상속기능 const Student = function(name, age){ this.name = name, this.age = age } Student.prototype.sayHi = function(){ console.log(`안녕 나는 ${this.name}이야`); } let 학생1 = new Student('Kim', 20); 학생1.sayHi(); var arr = [1,2,3]; var arr2 = [3,6,8,3,2,5,7]; Array.prototype.remove3 = function(){ for(let i = 0; i < this.length; i++){ if(this[i] == 3){ this.splice(i,1); } } } arr.remove3(); arr2.remo..