일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
- mac terminal command
- git flow
- html5 new tag
- #성적관리프로그램
- #3차원배열
- html video
- hyperledger transaction
- #1차원배열
- 하이퍼레저패브릭
- html id
- #자바상속#자바이즈어#is~a
- html code
- #bubbleSort
- #android activity
- html multimedia
- 토큰경제
- border-box
- relative path
- #C++ has~a
- docker example
- #C++ 연산자함수오버로딩
- #2차원배열
- html charset
- #CallByAddress
- #binary
- html plug-in
- #다차원포인터
- html youtube
- html object
- #JAVASCRIPT
- Today
- Total
목록#자바상속#자바이즈어#is~a (2)
A sentimental robot
public class AA { private String str; public AA(String a){ //AA생성자 overloading str=a; } public String getStr(){ return str; } } public class BB extends AA { private int aa; public BB(String a,int aa) { //BB 생성자 overloading super(a); // 부모클래스(AA)가 오버로딩 되었으니 명시적으로 적어준다. this.aa=aa; } public int getAa(){ return aa; } } public class CC extends BB { public CC(String a, int aa) { super(a, aa); } publi..
public class AA { private String str; public void setStr(String str){ this.str=str; } public String getStr(){ return str; } } public class BB extends AA{ private int aa; public void setAa(int aa) { this.aa = aa; } public int getAa() { return aa; } } public class CC extends BB{ public static void main(String []args){ CC cc=new CC(); cc.setStr("Superman"); cc.setAa(1000); System.out.println(cc.get..