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

Given the following expression, identify the coefficient of the 2nd term -6n^2+5n+3 A. -6 B. 2 C. 5 D. 3
Avocados, New or Old World?
what is the name for a computer based system that stores and uses information linked to geographic locations?
can y’all help me pls
Why computer is known as data processing system?
round 77.616 to two significant figures
difference between maize and bean.(atleast 5)​
Explain your personal concerns about prolonged exposure to the sun.Explain one thing you learned from the video about what really causes the skin to burn in the
Stem Changing Verbs e → ie & o → ue Fill in the blanks with the correct stem change of the verb. Remember not to stem change in nosotros and vosotros forms
can someone fill in the blanks PLz