you have to be a programmer to understand this question
6
0
Dzigi Bausays:
D is correct answer.
0
0
Alexandersays:
There is nothing even close in Darril’s book! That madness to ask such questions on entry level exam! I see that this is not very hard question if you have a little programming experience, but fact that such skill was not mention where-ever as expected skill for candidates. If you haven’t C programming experience it is impossible to understand C or D is the correct answer.
2
0
JayWalkerITsays:
Crazy question.
As a programmer I recognize this as likely being C++
That means it’s not C (NullPointerException) because that exact phrasing is from Java.
So it has to be D. However, this isn’t really a missing null check… this is someone doing nothing except setting something to null then trying to use it. It’s not a vulnerability as much as a deliberate two lines of code designed to crash.
1
0
Heinrichsays:
For example, this is a pointer: *pointer
And this a reference: &ref
So there is none of these in the code, so it must be MissingNullCheck
1
0
javadevsays:
This is 100% java code – I had to create an account to correct everyone saying D. I ran this code and received:
Exception in thread “main” java.lang.NullPointerException
at rainbow.main(rainbow.java:4)
Process finished with exit code 1
So the answer is C, although technically the code is invalid unless “object” is capitalized (which I fixed since none of the answer choices would be right).
So, while a null check could have prevented the error from occurring, the error you will get when you execute the code is “NullPointerException”
you have to be a programmer to understand this question
6
0
D is correct answer.
0
0
There is nothing even close in Darril’s book! That madness to ask such questions on entry level exam! I see that this is not very hard question if you have a little programming experience, but fact that such skill was not mention where-ever as expected skill for candidates. If you haven’t C programming experience it is impossible to understand C or D is the correct answer.
2
0
Crazy question.
As a programmer I recognize this as likely being C++
That means it’s not C (NullPointerException) because that exact phrasing is from Java.
So it has to be D. However, this isn’t really a missing null check… this is someone doing nothing except setting something to null then trying to use it. It’s not a vulnerability as much as a deliberate two lines of code designed to crash.
1
0
For example, this is a pointer: *pointer
And this a reference: &ref
So there is none of these in the code, so it must be MissingNullCheck
1
0
This is 100% java code – I had to create an account to correct everyone saying D. I ran this code and received:
Exception in thread “main” java.lang.NullPointerException
at rainbow.main(rainbow.java:4)
Process finished with exit code 1
So the answer is C, although technically the code is invalid unless “object” is capitalized (which I fixed since none of the answer choices would be right).
So, while a null check could have prevented the error from occurring, the error you will get when you execute the code is “NullPointerException”
I have spoken
1
0