Please consider the following (Practice Questions K&B OCJP6)
Which are true?
a. Comp. Fails
b. The assertion in line 4 is appropriate.
c. The assertion in line 14 is appropriate.
d. not relevant for my question
e. not relevant for my question
f. not relevant for my question
g.not relevant for my question
Looking at the two assertions and which ones are appropriate, one would notice the assertion 1 (line 4) is in a public method so it is a NO NO!!! Then you would notice that assertion 2 (line 14) is in a private method, which according to the K&B study guide is an APPROPRIATE place to have an assertion, since we more or less control it (private after all)....
Well, unfortunately this is NOT one of the correct answers, and my understanding is because the
String [] args passed into the private method is the reason. Still, i am looking at a private method and conclude that assertions there would be appropriate, since this is what i learned from the K&B book...
Can anybody shed some light why this is NOT an appropriate assertion (line 14)?