OutOfMemoryErrorOutOfMemoryError — Java Heap Space
The JVM has exhausted its available heap memory.
InputMismatchExceptionA Scanner token does not match the expected type.
Scanner.nextInt(), nextDouble(), or similar methods encounter input that cannot be parsed as the expected type. For example, reading a string when an integer is expected.
Use hasNextInt(), hasNextDouble() etc. to check before reading. Read as a string and parse manually. Wrap in try-catch to handle invalid input gracefully.
OutOfMemoryErrorThe JVM has exhausted its available heap memory.
ReflectiveOperationExceptionA reflection operation throws an exception.
IllegalArgumentExceptionA method receives an argument that is not valid for its expected range or format.
ConnectExceptionA connection to a remote host cannot be established.
InvalidClassExceptionA serialized class has an incompatible version or invalid format.
ObjectStreamExceptionAn exception occurred during Java object serialization or deserialization.