Results 1 to 12 of 12
  1. #1
    rednose is offline Member
    Join Date
    Nov 2008
    Posts
    6
    Rep Power
    0

    Default Simple code help

    Could someone help me with a simple problem. I need to write a procedure that removes duplicates from a StringBuffer object it gets as an argument.

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    1) what exactly do you mean by duplicates? duplicate letters? words? Do you have a printed specification of what you are trying to achieve?
    2) have you tried anything on your own yet?

    Good luck,
    Pete

  3. #3
    rednose is offline Member
    Join Date
    Nov 2008
    Posts
    6
    Rep Power
    0

    Default

    Quote Originally Posted by Fubarable View Post
    1) what exactly do you mean by duplicates? duplicate letters? words? Do you have a printed specification of what you are trying to achieve?
    2) have you tried anything on your own yet?

    Good luck,
    Pete
    Yes i mean letters. Like from a word letter becomes letr.

  4. #4
    Nicholas Jordan's Avatar
    Nicholas Jordan is offline Senior Member
    Join Date
    Jun 2008
    Location
    Southwest
    Posts
    1,018
    Rep Power
    8

    Default

    Do you have any code? Are you stuck? Can you write simple "Hello World" Java program.

    Do you know how to look at ( with code, not your eyes.) individual characters in a String? Do you know how to write a loop?
    Introduction to Programming Using Java.
    Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor

  5. #5
    rednose is offline Member
    Join Date
    Nov 2008
    Posts
    6
    Rep Power
    0

    Default

    Quote Originally Posted by Nicholas Jordan View Post
    Do you have any code? Are you stuck? Can you write simple "Hello World" Java program.

    Do you know how to look at ( with code, not your eyes.) individual characters in a String? Do you know how to write a loop?
    I know just the very basics like Hello World but this is beyond me.

  6. #6
    rednose is offline Member
    Join Date
    Nov 2008
    Posts
    6
    Rep Power
    0

    Default

    So anyone interested helping?

  7. #7
    CJSLMAN's Avatar
    CJSLMAN is offline Moderator
    Join Date
    Oct 2008
    Location
    Mexico
    Posts
    1,159
    Rep Power
    8

    Default StringBuffer help...

    Sure...
    • Here's a StringBuffer tutorial:

    The StringBuilder Class (The Java™ Tutorials > Learning the Java Language > Numbers and Strings)
    • .. and here's the API for the StringBuffer class and it's methods:

    StringBuffer (Java Platform SE 6)

    Luck,
    CJSL
    Chris S.
    Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.

  8. #8
    rednose is offline Member
    Join Date
    Nov 2008
    Posts
    6
    Rep Power
    0

    Default

    Thanks very much but I would need this for tomorrow and don't have time to start learning so if you would be so generous and just this time tell me how to do it.

  9. #9
    rednose is offline Member
    Join Date
    Nov 2008
    Posts
    6
    Rep Power
    0

    Default

    I might also add that the reason i need this is because i came to a java course late and didnt have time to learn it. If i dont return this homework i wont able to attend the exam. The exam wont be until next march so i have plenty of time to learn all the stuff i need.

  10. #10
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    I think that most of us are interested in teaching so that students learn. Your statements are probably going to motivate few.

  11. #11
    CJSLMAN's Avatar
    CJSLMAN is offline Moderator
    Join Date
    Oct 2008
    Location
    Mexico
    Posts
    1,159
    Rep Power
    8

    Default Great...

    You can start learning now...

    CJSL
    Chris S.
    Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.

  12. #12
    jralexander is offline Member
    Join Date
    Nov 2008
    Posts
    11
    Rep Power
    0

    Default

    What you're trying to do really isnt too complicated. Though I must admit if you're this reluctant to atleast attempt this on your own you're in for a rude awakening in a programming course. It takes a lot of time to learn these things. But with what you are trying to do if you sat down for 2 or 3 hours you should be able to do this. Try it on your own with your own code and if you get stuck post on here and you'll have a better chance of getting help.

Similar Threads

  1. Please help me this is simple bit of code
    By BlitzAcez in forum New To Java
    Replies: 4
    Last Post: 11-27-2008, 05:52 AM
  2. A simple Java source code viewer
    By Java Tip in forum SWT Tips
    Replies: 0
    Last Post: 07-11-2008, 04:34 PM
  3. Peculiarty in code of simple program...
    By Kreuz14 in forum New To Java
    Replies: 4
    Last Post: 01-23-2008, 03:27 AM
  4. simple code
    By elizabeth in forum New To Java
    Replies: 1
    Last Post: 08-07-2007, 06:49 PM
  5. problem with a simple java code
    By boy22 in forum New To Java
    Replies: 2
    Last Post: 08-03-2007, 02:46 AM

Posting Permissions

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