/**
* Created by yywang on 2017/1/14.
*/
class stack{
private String [] a;
private int N;
stack(int cap){
a = new String[cap];
}
void push(String o){
a[N] = o;
N++;
}
String pop(){
N--;
return a[N];
}
boolean isEmpty(){
return N==0;
}
int size(){
return N;
}
}
public class FixedCapaticyStackOfString
/**
* Created by yywang on 2017/1/14.
*/
class stack<Item>{
private Item [] a;
private int N;
stack(int cap){
a = (Item [])new Object[cap];
}
void push(Item o){
a[N] = o;
N++;
}
Item pop(){
N--;
return a[N];
}
boolean isEmpty(){
return N==0;
}
int size(){
return N;
}
}
public class FixedCapaticyStack