This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi all, In K&B bk on pg 378(Indian Edition)-2nd paragraph it is given that " The constructors for the Boolean wrapper class take either a boolean value true or false, or a case-insensitive String with the value "true" or "false"........... "
Now my question is that in fact the constructor of Boolean class takes any string as argument and not just "true" or "false". The only thing is that if the String is other than "true" then the newly created Boolean wrapper object will be initialized to false. ie. Boolean thisworks = new Boolean("abcde"); System.out.println(thisworks); //prints false So should this not be corrected in the book ??? I hope Kathy and Bates take this into consideration too and correct the statement in the book. Thanks,
"The man who can drive himself further once the effort gets painful is the man who will win." <br />Roger Bannister
Hi Vishy - I think we will clarify that statement in the book, thanks for the input. I want to ask everybody again.... please email us if you have an idea for our book! We sometimes miss threads on this forum, and we won't miss any emails you send us! Bert p.s. As an added benefit, if you email us, then you get your name listed in future printings of the book! (if you want :roll: )
Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)