Results 1 to 6 of 6
  1. #1
    LetsG0Blue is offline Member
    Join Date
    Feb 2013
    Posts
    68
    Rep Power
    0

    Default Is there a way to print words out backwards?

    Like instead of the output being

    The brown fox

    it'll print out

    eht nworb xof

    Just wondering?

  2. #2
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,655
    Blog Entries
    7
    Rep Power
    21

    Default Re: Is there a way to print words out backwards?

    Quote Originally Posted by LetsG0Blue View Post
    Like instead of the output being

    The brown fox

    it'll print out

    eht nworb xof

    Just wondering?
    The StringBuilder class together with the String.split( ... ) method can do what you want.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    tamilarasi is offline Member
    Join Date
    Nov 2012
    Location
    India
    Posts
    70
    Rep Power
    0

    Default Re: Is there a way to print words out backwards?

    Refer this link:[Moderartor edit: spoonfeeding link removed]

    This link is got what you want exactly..
    Last edited by DarrylBurke; 03-19-2013 at 09:29 AM.
    Regards
    Android developer at Trinay Technology Solutions,http://www.trinaytech.com,5705750475

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,423
    Rep Power
    20

    Default Re: Is there a way to print words out backwards?

    Quote Originally Posted by tamilarasi View Post
    This link is got what you want exactly..
    I think you've been told this before (and if you haven't, you should have been) -- we are all here to learn, not to pick up ready-made 'solutions' without a word of explanation.

    If you continue to spoonfeed, you may face a ban. There will be no further warning.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  5. #5
    Kagiso is offline Member
    Join Date
    Nov 2012
    Location
    Johannesburg, South Africa
    Posts
    92
    Rep Power
    0

    Default Re: Is there a way to print words out backwards?

    Quote Originally Posted by JosAH View Post
    The StringBuilder class together with the String.split( ... ) method can do what you want.

    kind regards,

    Jos
    Jos don't we use StringBuilder's reverse() method?

  6. #6
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,655
    Blog Entries
    7
    Rep Power
    21

    Default Re: Is there a way to print words out backwards?

    Quote Originally Posted by Kagiso View Post
    Jos don't we use StringBuilder's reverse() method?
    Yep, that was the idea; the spoonfeeding link posted by tamilarasi is terribly inefficient (and that's another reason the reply was removed).

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. Using if to print words
    By TANKDS in forum New To Java
    Replies: 33
    Last Post: 08-14-2012, 05:22 PM
  2. [SOLVED] Backwards compiling and Generics
    By kammce in forum Advanced Java
    Replies: 5
    Last Post: 07-19-2012, 08:16 AM
  3. Need to find a way to print line spacing by words
    By technoreject in forum New To Java
    Replies: 1
    Last Post: 07-07-2011, 02:43 PM
  4. Replies: 3
    Last Post: 02-13-2011, 08:54 PM
  5. How to print words in different colours?
    By veen in forum New To Java
    Replies: 7
    Last Post: 06-10-2010, 04:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •