listing recursion continued public params(int nnint ran=nnreturnaddress=ra/end class params ///////////////////////////////////////////////////////////////class stackx private int maxsize/size of stackx array private params[stackarrayprivate int top/top of stack //public stackx(int /constructor maxsize /set array size stackarray new params[maxsize]/create array top - /no items yet //public void push(params /put item on top of stack stackarray[++topp/increment topinsert item //public params pop(/take item from top of stack return stackarray[top--]/access itemdecrement top //public params peek(/peek at top of stack return stackarray[top]///end class stackx ///////////////////////////////////////////////////////////////class stacktriangleapp static int thenumberstatic int theanswer