Can't push values in mystack

in the code below i am unable to pop the value from “helper stack” and push into “mystack” and im very confident about push and pop functions and have checked them multiple times (the’re fine )

public class reverse_mystack {

public static void main(String[] args) throws Exception {
	// TODO Auto-generated method stub
	stack_using_arrays mystack = new stack_using_arrays();
	stack_using_arrays helper = new stack_using_arrays();
	for (int i = 10; i < 60; i = i + 10) {
		mystack.push(i);
	}

// System.out.print(“mystack=>”);
mystack.display();
reverse_Stack(mystack, helper, 0);
mystack.display();
}

public static void reverse_Stack(stack_using_arrays mystack, stack_using_arrays helper, int index)
		throws Exception {
	if (mystack.isEmpty())
		return;
	int item = mystack.pop();
	reverse_Stack(mystack, helper, index + 1);
	helper.push(item);
	if(index==0) {
		helper.display();
		for(int i=0;i<5;i++) {
			int val=helper.pop();
			mystack.push(val);
		}
	}
}

}

@javadsalgo123,
Can you send your full code through https://ide.codingblocks.com/

I’ve uploaded the code , what to do next?

@javadsalgo123,
Please share the link too.

paste your code on https://ide.codingblocks.com/ and select the correct language.

press ctrl+s. confirm file name. share the link with me.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.