Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 5 of 5

Thread: how to catch the particular word?

  1. #1
    Junior Member
    Join Date
    Jul 2012
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default how to catch the particular word?

    well, my question is simply, for example i wanna to catch something in a string:
    String name = "RobertTio";
    ok i wanna to get rid of robert so i can get the word behind it, do it have any way to do it?


  2. #2
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 263 Times in 232 Posts

    Default Re: how to catch the particular word?

    I'm pretty sure there is a method for doing that.
    Probably would hide something like that in the String class so no one can find it.

  3. #3
    Junior Member
    Join Date
    Jul 2012
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: how to catch the particular word?

    BUMPppppppppppppppppp

  4. #4
    Junior Member
    Join Date
    Jul 2012
    Posts
    17
    Thanks
    1
    Thanked 3 Times in 3 Posts

    Default Re: how to catch the particular word?

    Not necessarily hidden... try reading through the relevant Java Tutorials trail.

  5. #5
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 263 Times in 232 Posts

    Default Re: how to catch the particular word?

    Quote Originally Posted by sxlend View Post
    BUMPppppppppppppppppp
    Quote Originally Posted by veeer View Post
    Not necessarily hidden...[/url].
    LOL!!!
    ok so i apologize..... I can sometimes be sarcastic....

    THE METHOD YOU WANT IS IN PLAIN SIGHT IN THE STRING CLASS!!!

    it is call indexOf and takes a String (the string you want to search for)

Similar Threads

  1. read a file word by word
    By poornima2806 in forum File I/O & Other I/O Streams
    Replies: 1
    Last Post: February 23rd, 2012, 03:14 PM
  2. how do i try/catch this?
    By safra in forum Exceptions
    Replies: 6
    Last Post: October 29th, 2011, 11:14 AM
  3. Reading a text file word by word
    By dylanka in forum File I/O & Other I/O Streams
    Replies: 3
    Last Post: October 21st, 2011, 02:06 PM
  4. catch all
    By silverspoon34 in forum Exceptions
    Replies: 1
    Last Post: November 29th, 2009, 02:18 PM
  5. try/catch
    By rsala004 in forum Exceptions
    Replies: 5
    Last Post: July 19th, 2009, 03:20 PM