Strings

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sign711
    New Member
    • May 2007
    • 1

    #1

    Strings

    I am trying to complete my last program for intro to Java. Can anyone explain how to create a new string from an old one and take out the spaces from that string?
  • RedSon
    Recognized Expert Expert
    • Jan 2007
    • 4980

    #2
    We can't do your homework for you. But we can help you if you are stuck. Are you stuck on anything or do you just wish that someone will tell you how to do it?

    Comment

    • JosAH
      Recognized Expert MVP
      • Mar 2007
      • 11453

      #3
      Originally posted by sign711
      I am trying to complete my last program for intro to Java. Can anyone explain how to create a new string from an old one and take out the spaces from that string?
      Did you read the API documentation for the String class? I guess not otherwise
      you would have noted a method replaceAll() which does exactly what you want.

      kind regards,

      Jos

      Comment

      Working...