aspose file tools*
The moose likes Beginning Java and the fly likes Question about how to convert a boolean to a String Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Question about how to convert a boolean to a String" Watch "Question about how to convert a boolean to a String" New topic
Author

Question about how to convert a boolean to a String

Sean Gildea
Ranch Hand

Joined: Jul 01, 2004
Posts: 81
I want to convert a boolean to a String so I can input it into a String array

Here is what I am trying but it is erroring out.



I also tried this but it did not work.


Just FYI, below is how I implemented the get method.



SCJD, SCBCD, SCJP
Joyce Lee
Ranch Hand

Joined: Jul 11, 2003
Posts: 1392
Hi Sean,

I want to convert a boolean to a String so I can input it into a String array



Joyce
[ October 19, 2004: Message edited by: Joyce Lee ]
Andrew Eccleston
Ranch Hand

Joined: Jul 07, 2004
Posts: 140
Hi Sean,

Or there always:



andrew
[ October 19, 2004: Message edited by: Andrew Eccleston ]

The statement below is true.<br />-------------------------------<br />The statement above is false.
David Harkness
Ranch Hand

Joined: Aug 07, 2003
Posts: 1646
One more way:
Jeff Bosch
Ranch Hand

Joined: Jul 30, 2003
Posts: 805
And for those old C Dogs out there, the ol' if-then statement:



Not as elegent, perhaps, but valid! (I'm guilty of being one of those old C Dogs myself!)


Give a man a fish, he'll eat for one day. Teach a man to fish, he'll drink all your beer.
Cheers, Jeff (SCJP 1.4, SCJD in progress, if you can call that progress...)
Tony Morris
Ranch Hand

Joined: Sep 24, 2003
Posts: 1608
Sean, I'm curious.
Given the relatively trivial nature of your problem, I find it difficult to comprehend how anyone who has passed the SCJP 1.4 exam could possibly be so uninformed as to not be able to solve it themselves.

I apologise for any abruptness but please answer the following:
- Did you really pass the SCJP 1.4 exam?
- If so, how did you pass the SCJP 1.4 exam? Did you merely memorise the objectives, despite having little (no?) knowledge of how to apply them?


Tony Morris
Java Q&A (FAQ, Trivia)
Jeff Bosch
Ranch Hand

Joined: Jul 30, 2003
Posts: 805
Interesting question. When visiting the beginner forum, I don't even look at the originator's credentials. Maybe I need to change that philosophy...
 
Don't get me started about those stupid light bulbs.
 
subject: Question about how to convert a boolean to a String