About 229,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 to solve java.lang.NullPointerException error? [duplicate]

    Sep 3, 2015 · For example, If I do this: Integer myInteger = null; int n = myInteger.intValue(); The code tries to grab the intValue of myInteger, but since it is null, it does not have one: a null …

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

    Mar 15, 2017 · 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 - What is a NullPointerException, and how do I fix it?

    May 8, 2023 · My test automation returns NullPointerException. What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to …

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

    Jul 30, 2019 · 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 …

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

    May 7, 2025 · I do a condition with a value when it is null and when it is not null. The time where this value is null I got the java.lang.NullPointerException. How could I deal with this in order to …

  7. Catching nullpointerexception in Java - Stack Overflow

    I tried using try-catch block to catch NullPointerException but still the following program is giving errors. Am I doing something wrong or is there any other way to catch NullPointerException in ...

  8. NullPointerException in Java with no StackTrace - Stack Overflow

    I've had instances of our Java code catch a NullPointerException, but when I try to log the StackTrace (which basically ends up calling Throwable.printStackTrace() ), all I get is: java.lang.

  9. NullPointerException while using put method of HashMap

    Feb 18, 2017 · My case was different as Usually, hashmaps throw the null pointer exception when trying to read a key that is not there e.g I have a HashMap<String, Integer> map = new …

  10. Java for-each loop throw NullPointException - Stack Overflow

    Apr 28, 2013 · The following java segment will result a NullPointException, since the variable list is null, which is pass to the for-each loop. List&lt;&gt; arr = null; for (Object o : arr) { …

Refresh