IllegalMonitorStateExceptionIllegalMonitorStateException
A thread attempts a monitor operation (wait, notify) without owning the object's monitor.
NullPointerExceptionA null reference is used where an object is required.
A method is called or a field is accessed on a reference that is null. This is one of the most common Java exceptions. It occurs when objects are not properly initialized, returned as null from methods, or when collections contain null elements.
Add null checks before accessing objects. Use Optional<T> to represent values that may be absent. Initialize objects properly before use. Use Objects.requireNonNull() for fail-fast null detection.
String s = null;
s.length(); // NPEIllegalMonitorStateExceptionA thread attempts a monitor operation (wait, notify) without owning the object's monitor.
AccessDeniedExceptionA file system operation is denied due to insufficient permissions.
ClassCircularityErrorA circular dependency is detected in class inheritance.
ObjectStreamExceptionAn exception occurred during Java object serialization or deserialization.
DateTimeParseExceptionA date/time string cannot be parsed according to the expected format.
ConcurrentModificationExceptionA collection is modified while being iterated over.