autumn1595 autumn1595
  • 24-02-2020
  • Computers and Technology
contestada

If you're getting a NullPointerException, remember that it is a perfectly valid use-case to have the constructor argument be null. What should happen in this case?

Respuesta :

colocho08
colocho08 colocho08
  • 01-03-2020

Answer:

Explanation:

NullPointerException is a RuntimeException. En Java, this happens when an application try to use a reference but this is null, this is used just to create an object, because an object references cannot exist without a value, so we assign the null value to it, but no object is created and the compiler does not detect it.

For example

Object obj = null;

obj.toString();  // This statement will throw a NullPointerException

Answer Link

Otras preguntas

Rectangle QUAD has coordinates​ Q(0,0), ​U(0,​3), ​A(7​,​3), and ​D(​7,0). ​Q'U'A'D' is the image of QUAD after a dilation with center​ (0,0) and scale factor 6
please i just want the answer for the boxes if you know the right answer please tell me please​
Which sentence could be added to the passage as a specific supporting detail? Take a look at the picture!
3k + 9(k - 4) - 10k 32 - 2(k+8)
Use the GCF and the distributive property to express the sum as a product 35+25
what do observations suggest about knowledge?
answer for brainliest
How does the heart become more efficient over time with cardio?
PLEASE HELP ME ASAP PLEASE
Sue wants to put a rectangular garden on her property using 88 meters of fencing. There is a river that runs through her property so she decides to increase the