I want to use an array representation for a generic stack, but code like the following will

Question:

I want to use an array representation for a generic stack, but code like the following will not compile. What is the problem?

\[\text { private Item[] item = new Item[capacity]; }\]

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: