Description: An array-based Stack class. Since this class is designed using an array the size of the Stack is limited to whatever the program gives you. The key reason was not to use any outside help like Arrays.copyOf(array, size) to increase size etc. (In future, LinkedStack will solve size problem). MAX_SIZE is made public to let a user know about MAX_SIZE and size() returns current size of the Stack. Return value int is used to make sure all push/insertions are successful on Stack.
An array-based
Stackclass. Since this class is designed using an array the size of theStackis limited to whatever the program gives you. The key reason was not to use any outside help likeArrays.copyOf(array, size)to increase size etc. (In future,LinkedStackwill solve size problem).MAX_SIZEis made public to let a user know aboutMAX_SIZEandsize()returns current size of theStack. Return valueintis used to make sure all push/insertions are successful onStack.
So rightRight now I'm just looking for suggestions to improve my code before I push it to my githubGitHub account. All suggestions are appreciated. Thanks.