1. java.lang.OutOfMemoryError: Java heap space. Do not use arrays or collections.

2. java.lang.StackOverflowError. Do not use recursive methods.