About 59 results
Open links in new tab
  1. java - What is a NullPointerException, and how do I fix it? - Stack ...

    What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause so that you stop the exception from causing the …

  2. How do I avoid checking for nulls in Java? - Stack Overflow

    For those fast to downvote (and not so fast to read documentation) I would like to say that I've never caught a null-pointer exception (NPE) in my life. But this possibility was intentionally designed by the …

  3. How to solve java.lang.NullPointerException error? [duplicate]

    Sep 3, 2015 · Exception in thread "main" java.lang.NullPointerException at AnotherClassLoader.loadClass(test.java:58) at test.main(test.java:30) at Main.main(Main.java:68) …

  4. java - ¿Cuál es la solución a todos los errores NullPointerException ...

    Tienes un problema con el API. Has seguido todos los pasos arriba comentados, y al final has encontrado que la causa del origen es que estás llamando a java.util.Collections.toArray() y te …

  5. java - Что такое Null Pointer Exception и как его исправить? - Stack ...

    Mar 23, 2019 · 72 Что из себя представляет исключение Null Pointer Exception (java.lang.NullPointerException) и почему оно может происходить?

  6. java - What is a NullPointerException, and how do I fix it? - Software ...

    May 8, 2023 · What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause so that you stop the exception from …

  7. exception - java.lang.NullPointerException - Stack Overflow

    Jun 1, 2010 · It's only if you try accessing whatever a null reference points to that you get the exception. So calling methods or accessing other instance members of the object is out of the question.

  8. java - IllegalArgumentException or NullPointerException for a null ...

    Effective Java 2nd Edition, Item 60: "Arguably, all erroneous method invocations boil down to an illegal argument or illegal state, but other exceptions are standardly used for certain kinds of illegal …

  9. No Exception while type casting with a null in Java

    Sep 10, 2013 · You can cast null to any reference type without getting any exception. The println method does not throw null pointer because it first checks whether the object is null or not. If null then it …

  10. Java HashMap get method null pointer exception - Stack Overflow

    Mar 12, 2016 · Java HashMap get method null pointer exception Asked 13 years, 1 month ago Modified 4 years, 9 months ago Viewed 139k times