Which of the following vulnerabilities would occur if this is executed?

Refer to the following code:
public class rainbow {
public static void main (String [] args) {
object blue = null; blue.hashcode (); }
}
Which of the following vulnerabilities would occur if this is executed?
A. Page exception
B. Pointer deference
C. NullPointerException
D. Missing null check

How To Pass SY0-601 Exam?

CompTIA SY0-601 PDF dumps.

High quality SY0-601 pdf and software. VALID exam to help you pass.

comptia-exams

One thought on “Which of the following vulnerabilities would occur if this is executed?

  1. D. Missing Null Check

    Wasn’t sure on why this was the answer but after looking at what this answer meant, by seeing what the object blue =null; string could potentially mean, is that since this string is there, it is forcing the object blue to equal null, therefore, the official null check has become that ‘object blue’ rather instead its own string for a null check. the Object Blue potentially means something else but is equaling null in this case, and there is no further mention of null in any other script, therefore my answer lead to the logic of D. Missing Null Check, which was the correct answer.

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.