Discuss the below:
Q: Create an application program that prompts the user to enter a number (a number only, error check for numerals only), subtract 50 from that number, and then declare an array using the calculated size. If you attempt to declare an array whose computed size is a negative, the program should throw an exception. Use a catch block to catch the exception if there is one, and then display the associated message.