일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 토큰경제
- #2차원배열
- #binary
- html video
- #3차원배열
- relative path
- #bubbleSort
- git flow
- html plug-in
- html5 new tag
- html object
- #성적관리프로그램
- 하이퍼레저패브릭
- border-box
- #다차원포인터
- html code
- html id
- html multimedia
- html youtube
- #JAVASCRIPT
- #C++ 연산자함수오버로딩
- mac terminal command
- hyperledger transaction
- #1차원배열
- #C++ has~a
- html charset
- #android activity
- docker example
- #CallByAddress
- #자바상속#자바이즈어#is~a
Archives
- Today
- Total
목록#stack#queue (1)
A sentimental robot
추상클래스를 이용한 스택,큐!
public abstract class Memory { protected int[] array; // protected 접근지정자는 상속받은 자식들만 쓸 수 있음 protected int top; public Memory(){ array=new int[10]; top=0; } public void push(int num){ array[top++]=num; } public abstract int pop(); // 추상 메소드 } public class MyStack extends Memory { @Override public int pop() { return array[--top]; } } public class MyQueue extends Memory { private int front; public M..
Java
2017. 12. 29. 11:10