You could do somthing like this if you wanted to, passing in an stack to the constructor.
Code:public class X{ private Stack thefuture; public X(Stack thefuture){ this.thefuture = thefuture; } public push(Object x){ thefuture.push(x); } public Object pop(){ return thefuture.pop(); } }




Reply With Quote