educative.io

Educative

Why there is error of Stack?

As I ran my code, the error of educative console pops out saying sth wrong with ‘Stack’.

Hello Isobel,

It would help a lot if you could please share the screenshot of the exact error shown by the console.

It could be that you need to implement the pair class first which is going to be used by the stack in the solution, but it’s hard to be sure without looking at the exact error returned by the Java compiler.

Hello @isobel_deng,

I hope you’re doing well!

We ran the solution code provided by us and found no errors in it. The error you mention is very generic and may be caused due to various reasons, with as little as a small typo in the code.
Please share your complete code with us, so we can reproduce the error and guide you further.

As always, we appreciate our valued users reaching out to us. Therefore, please write to us if you have any further queries, concerns, or suggestions in general.

We hope you enjoy your experience with us at Educative! Happy learning!