aspose file tools
The moose likes Beginning Java and the fly likes please help me with this code. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "please help me with this code." Watch "please help me with this code." New topic

please help me with this code.

deepak bhai
Ranch Hand

Joined: Apr 22, 2011
Posts: 33

Find the number of occurrences of given word in a sentence.

why its not working
Junilu Lacar

Joined: Feb 26, 2001
Posts: 5861

Please read this: ItDoesntWorkIsUseless (←click)

Junilu - [How to Ask Questions] [How to Answer Questions]
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 41589
Write a sentence on paper, and use a pencil to go through the sentence and count not only how many times the word appears in the sentence, but also the index at which you are inspecting the sentence.
Amit Ghorpade

Joined: Jun 06, 2007
Posts: 2764

Why are you checking the same condition in the while statement and the if inside the while?

|Asking Good Questions|
deepak kushwaha
Ranch Hand

Joined: Jul 17, 2010
Posts: 33
Thank you for all the help, The code is fixed. Thank you once again.
Have you tried LearnNowOnline?
subject: please help me with this code.