Jim,
Congrats on passing the exam!
Jerzy Los wrote:Mock exam question with assert x >= 1 && x <= 6;
Explanation: Since no AssertionError is thrown, the code outputs 7, so D is true and E is false. Therefore, the answer is D and E.
Agreed. Added to the errata. Luckily it is just a typo in the explanation and the actual answer is correct in the engine!
Jerzy Los wrote:Mock exam there is line f2 two times:
for(Integer item : list2) list2.add(item); // f2
for(Integer key : map3.keySet()) map3.remove(key); // f2
Agreed. Added to the errata.
Jerzy Los wrote:Mock exam question about OutputStream class parto of explanation:
All streams, including instances of OutputStream, should be closed after use, so E is correct. Finally, an OutputStream may be periodically flushed, but it is not required for use, so F is incorrect.
i believe it should be:
All streams, including instances of OutputStream, should be closed after use, so F is correct. Finally, an OutputStream may be periodically flushed, but it is not required for use, so G is incorrect.
Agreed. Added to the errata.
Jerzy Los wrote:Mock exam a question with z.accept(1.0); z variable is undeclared so code will not compile, but it's mentioned in an explanation: Line 8 calls accept(), making it a consumer.
Agreed. Added to the errata.