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

Which property of exponents must you apply to the expression p^1/2 to derive p as the result?
The president can finalize the budget without the approval of congress because of his executive power-true -false
Need help on spanish homework
While revising your media analysis essay, remove
I dont understand this question. Also if anyone is on geometry byu part two let me know and we can work together !
Which statement about sentence structure is FALSE? Students should vary the way that sentences start. Students should vary the length of the sentences. Students
Find the magnitude of pressure in Pascal of 150N that acts normally on area. Of 0.25m2
Write 6.92 x 10-8 in standard notation
simplify(18-9.(-4/3)+10×2)​
Immoveable joints are a. diarthrotic b. synathrotic c. amphiarthrotic d. syndesmose