To handle NullPointerExceptions in Java, always check if an object is null before calling its methods. For example: if (myObject != null) { myObject.doSomething(); }. Alternatively, use Java 8's Optional class to avoid nulls. Avoid using try-catch for NullPointerException as control flow, as it's considered bad practice.