[SCJP 6.0]
[SCJP 6.0]
Anastasia Sirotenko wrote:the answer is definitly should be something like " Boolean.parseBoolean(String) returns boolean value, not Boolean object, so you cannot call a getClass() method on boolean value"
SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Ankit Garg wrote:
Anastasia Sirotenko wrote:the answer is definitly should be something like " Boolean.parseBoolean(String) returns boolean value, not Boolean object, so you cannot call a getClass() method on boolean value"
Check the java.lang.Boolean class documentation. There is no parseBoolean method in it.
Ankit Garg wrote:your second code, you missed final before the class C...
[SCJP 6.0]
Nitish Bangera wrote:Well as for the second one, before casting think you apply a instanceof well instanceof is like on the right side there can be any interface but on the left of the instanceof there should be a non final class. Well same applies here. And if arrays are there then nonfinal class array instance of interface array >---->(Interface array)non final class array and not (Interface array)non final class. I guess this was there in the examlab.
[SCJP 6.0]
Nitish Bangera wrote:Ankit parseBoolean is definitely there in the Boolean wrapper which gives out a boolean.
SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Nitish Bangera wrote:Ankit parseBoolean is definitely there in the Boolean wrapper which gives out a boolean.
SCJP6, SCWCD5, OCE:EJBD6.
BLOG: http://leakfromjavaheap.blogspot.com
Author of ExamLab - a free SCJP / OCPJP exam simulator
What would SCJP exam questions look like? -- OCPJP Online Training -- Twitter -- How to Ask a Question
Author of ExamLab - a free SCJP / OCPJP exam simulator
What would SCJP exam questions look like? -- OCPJP Online Training -- Twitter -- How to Ask a Question
Devaka Cooray wrote:Anastasia,
What is the screen resolution you are using there?
The appearance of the "Copy Program" button in your screenshot makes me confused.![]()
[SCJP 6.0]
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |