Double posted here thread locked due to it being in a different post as well
As I had asked in that post how are you calling your method? Not only that you are now returning an empty stack and not a newly created stack which has reversed elements in it.
Think of calling this method as baseball.
1. You pitch the ball (Call the method)
2. The batter hits the ball (Method returns something)
3. Someone catches the ball (Value is assigned to something)
If you are missing one then you won't have your desired results. The reason I am guessing your other version wasn't working was because you were missing step number 3. You were probably just calling Object.reverse() which it was returning the ball but there was no catcher so the ball got lost and you were left with the original stack you called .pop() on.