Create a class Stack that can be used to store any kind of Java objects. Use an array internally to store the objects. The push and pop methods should throw appropriate exceptions. Write a class StackDemo with a main method. The method main should use the Stack object, catch the exceptions and print appropriate error messages.