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

    A null pointer is one that points to nowhere. When you dereference a pointer p, you say "give me the data at the location stored in "p". When p is a null pointer, the location stored in p is …

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

    Jul 30, 2019 · Java 8 has introduced a new class Optional in java.util package. Advantages of Java 8 Optional: 1.) Null checks are not required. 2.) No more NullPointerException at run …

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

    Mar 15, 2017 · No caso específico do Java, o NullPointerException é lançado nas seguintes situações: Tentar acessar um campo de uma instância cuja referência seja null. Pessoa p = …

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

    May 8, 2023 · If driver.findElement() fails to find myElement, the value will be null, which means that the attempt to click actually resolved to: null.Click(); Obviously this can't work, so a null …

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

    5 days ago · The time where this value is null I got the java.lang.NullPointerException. How could I deal with this in order to dismiss this exception? I need the condition when the value is null …

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

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

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

  8. java - Mockito - NullpointerException when stubbing Method

    Oct 14, 2015 · The reason why is that any() returns a generic object reference. This object is unboxed to an integer, so the generic type is determined to be 'Integer'. The object is null …

  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 - Maven throws nullpointer exception - Stack Overflow

    I have built a project using maven. Throughout this project, I have concluded that one more dependency has to be added for a particular module. I have added this dependency in it's pom …

Refresh