This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Doubt in Boolean and Character class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Doubt in Boolean and Character class" Watch "Doubt in Boolean and Character class" New topic
Author

Doubt in Boolean and Character class

Karthikeyan Balasubramanian
Ranch Hand

Joined: Apr 20, 2005
Posts: 89
Hii all....
there was a table in chapter 6 which shows the methods available in all the wrapper classes...
i had a doubt in it.
1.toString(primitive)------
2.valueOf(String)----------
is there such methods for Character and Boolean......y it was not specified in the book.
Thnaks in advance.


SCJP 1.4--93%<br />SCWCD 1.4--86%<br />Next--???
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Chapter 6 of what book?


Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Karthikeyan Balasubramanian
Ranch Hand

Joined: Apr 20, 2005
Posts: 89
Hi.....i thought K&B book was defalut one.
it was in the K&B book.
Gyanesh Sharma
Ranch Hand

Joined: Nov 27, 2005
Posts: 47
I assume that you are talking about the book by K&B.

Boolean and Character both classes have valueOf() methods.
toString is available only for Boolean.
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
[GS]: toString is available only for Boolean.

No.

You know, the API can easily answer a question like this. Even without the API, you should know that every class inherits toString() from OBject or another superclass, if it doesn't have a toString() of its own.


"I'm not back." - Bill Harding, Twister
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
[KB]: y it was not specified in the book.

Because the book does not necessarily list every method of every class, especially when they are standard methods inherited by all classes.
[ November 30, 2005: Message edited by: Jim Yingst ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Doubt in Boolean and Character class
 
Similar Threads
Doubt
doubt in || and &&
doubt on basics
Doubt in K&B SCJP 5: topic Using Wrapper Conversion Utilities
Small Doubt