About 432,000 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 …

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

    In Nice, a Java-derived language, there are two versions of all types: a potentially-null version and a not-null version. You can only invoke methods on not-null types.

  3. java - O que é a NullPointerException e quais são suas principais ...

    May 12, 2015 · O que são exceções NullPointerException? Quais são suas principais causas? Que métodos/práticas podem ser utilizadas para se prevenir?

  4. Java: How to check for null pointers efficiently - Stack Overflow

    Feb 27, 2017 · For regular Java code, I still perceive this as an awkward (apparently generally accepted) hack. If a null check is the performance bottleneck in your Java source, chances are …

  5. 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 …

  6. 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 …

  7. 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 …

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

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

  9. 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 …

  10. java - Is it okay to throw NullPointerException programmatically ...

    Jul 24, 2010 · A NPE is the way to tell that some method parameter was null, and is the perfect exception for it. Not IllegalArgumentException. Also throwing it in your own code is not …