• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

toString(primitive) - Kathy's book

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am following Kathy's Java 2 book for my programmer certification. In page 380, table 6-3, she has mentioned toString(primitive) is not for Boolean and Character(by not marking with 'x'). However when i tried it works.

ex: System.out.println(Boolean.toString(true)) - prints true.
System.out.println(Character.toString('t')) = prints t.
Can anyone explain this? Kathy,....HELP!!! Ur book is too good. Thanks alot.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your notice.
According to Sun 1.4 api specification,
the two static methods,
Boolean.toString(boolean) and Character.toString(char)
are just added in standard 1.4.
So I wonder if the table is one piece of information that based on Kathy's previous book which covered both 310-027 and 310-035.
It just a little mistake, do you think so?
If I state sth wrong, please forgive me.
 
raman padma
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Thanks a lot for verifying that for me. Infact there is one more thing missing. At the beginning of the table (pg 379), she has not mentioned the method "booleanValue". Is it the new thing also? Can u confirm?
Well, it is a little mistake for u, because u passed already. For me,
I answered one question wrong thinking that booleanValue will lead to compilation Error because i memorised the table as advised by Kathy!!!
Thanks a lot once again.
 
author
Posts: 9050
21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Raman!
This is an error in the book, we already have this on our list to fix - so good catch, and we're sorry for the error.
Bert
 
raman padma
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bert,
Thanks for your reply. But where are the errors posted? Can you tell me the link where I can go and check for the known errors?
Thanks,
Raman :roll:
 
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Raman,
If you go to the publisher's website and find the book (here), you can find a lot of details about the book, including an "errata" section, where known errors are posted. The errata link is on the right side of the page (or you can just click here).
 
They worship nothing. They say it's because nothing lasts forever. Like this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic