For a homework exercise involving exception handling, I need to produce an OutOfMemoryError exception so I can write a try-catch and catch it:
"13.10 (OutOfMemoryError) Write a program that causes the JVM to throw an OutOfMemoryError and catches and handles this error."
I searched the Java API and couldn't find anything on OutOfMemoryError exceptions in the exception list. What is an OutOfMemoryError exception, and how can I produce one for my assignment?