• 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

Question about how to convert a boolean to a String

 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

 
Ranch Hand
Posts: 1392
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Sean,

Or there always:



andrew
[ October 19, 2004: Message edited by: Andrew Eccleston ]
 
Ranch Hand
Posts: 1646
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One more way:
 
Ranch Hand
Posts: 808
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!)
 
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Jeff Bosch
Ranch Hand
Posts: 808
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Interesting question. When visiting the beginner forum, I don't even look at the originator's credentials. Maybe I need to change that philosophy...
 
Forget Steve. Look at 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