|
Nurettin Armutcu wrote:Option D is said to be correct: Finally, Option D is correct as the ^ is only applied to boolean values in Java.
But there is a bitwise ^ operator in Java too, so it can be applied to both boolean and numerical values.
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Nurettin Armutcu wrote:There seems to be a little mistake in Chapter 6, Question 8:
...
This sample code would work with a primitive long as return type, but the wrapper class Long requires an explicit cast before returning.
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Nurettin Armutcu wrote:There is one more in Chapter 6, Question 36:/quote]
That was already in the errata. It was original reported here
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Nurettin Armutcu wrote:Chapter 7, Question 14:
...
This would be correct as output, but the application does not run since there is no String[] parameter defined in the parameter list.
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Nurettin Armutcu wrote:Chapter 7, Question 48:
...
Option A would be correct if 12L is returned instead of 12. Whe have the same mistake as in Chapter 6, Question 8.
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
36. What statement about the ^ operator is correct?
A. If one of the operands of ^ is true, then the result is always true.
B. There is a conditional form of the operator, denoted as ^^.
C. If both operands of ^ are true, the result is true.
D. The ^ operator can only be applied to boolean values.
Option D is said to be correct: Finally, Option D is correct as the ^ is only applied to boolean values in Java.
But there is a bitwise ^ operator in Java too, so it can be applied to both boolean and numerical values.
Oracle Certified Professional Java SE 8
If one of the operands of ^ is true, then the result is always true.
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|