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.


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

Results 1 to 2 of 2

Thread: String in java

  1. #1
    Junior Member
    Join Date
    May 2013
    Thanked 0 Times in 0 Posts

    Default String in java

    I have a task and I need programming a small program like this;

    The program will count in a string text area how many used the same word.
    Example text

    " A dog run out of home.When dog come back home he saw that there is another dog in home."

    In this text how many time word "dog" is used I have to count.But I dont know how can I make this program.I just think that I have to define a variable as this text value.And more I dont know what to do.

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

    Default Re: String in java

    Break the problem up into a series of steps, or smaller problems to work on, and work on one at a time.
    What have you tried so far?

Similar Threads

  1. Java String Buffer
    By anonb in forum Object Oriented Programming
    Replies: 3
    Last Post: December 19th, 2012, 02:59 AM
  2. Replies: 1
    Last Post: April 19th, 2012, 02:46 AM
  3. java.lang.String cannot be cast to java.util.Hashtable
    By ashin12 in forum What's Wrong With My Code?
    Replies: 6
    Last Post: April 1st, 2012, 06:17 AM
  4. Java Error cannot be applied to (java.lang.String), phone book entry program.
    By iceyferrara in forum What's Wrong With My Code?
    Replies: 5
    Last Post: September 23rd, 2011, 06:32 AM
  5. Replies: 2
    Last Post: November 3rd, 2009, 06:28 AM