Search:

Type: Posts; User: beer-in-box

Search: Search took 0.08 seconds.

  1. Replies
    15
    Views
    1,693

    [SOLVED] Re: Seperating Strings

    Thank you for the all knowledge you shared with me :)
    It was like a private lesson covering String topic!
  2. Replies
    15
    Views
    1,693

    [SOLVED] Re: Seperating Strings

    This :) :



    Can you give me some clues so that I can try to figure it out. My first attempt failed as always :D
  3. Replies
    15
    Views
    1,693

    [SOLVED] Re: Seperating Strings

    Okay, so all happened because I was lazy and didn't use nextLine...

    So, can you examplify what you told please?

    And,in "[:,\\s]+", why are we using "+" and why do we put two "\"s?
  4. Replies
    15
    Views
    1,693

    [SOLVED] Re: Seperating Strings

    It works when I use it like you use (when I define the string and don't get from the user). But when I want to use it with Scanner, it fails. Could you run this code when you are free and tell me why...
  5. Replies
    15
    Views
    1,693

    [SOLVED] Re: Seperating Strings

    I suspected this :) So, I will examplify it. Here is my code again, which works when the input doesn't have a space:

    public void metotUc(){
    input = new Scanner(System.in);...
  6. Replies
    15
    Views
    1,693

    [SOLVED] Re: Seperating Strings

    Thank you once again. This solves one of my problems here.
    But I still have the same damn thing. Why do I have "This" as an output when I enter "This is a trial, to use split: methods."? How can I...
  7. Replies
    15
    Views
    1,693

    [SOLVED] Re: Seperating Strings

    Haha, I should have read more carefully. Ignore the previous post please :)
    I found the answer to my first question:

    public void metotUc(){
    input = new Scanner(System.in);...
  8. Replies
    15
    Views
    1,693

    [SOLVED] Re: Seperating Strings

    Thanks for the answer. I also learnt that StringTokenizer is a legacy class while I was researching about splitting text.

    About the Pattern API, either I miss something big or it won't help me...
  9. Replies
    15
    Views
    1,693

    [SOLVED] Seperating Strings

    Hi,
    I was trying to learn about dealing with Strings. I came across with StringTokenizer. It seemed like it makes things easier, but I cannot seperate a text if I put a space between words. Here is...
Results 1 to 9 of 10