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
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "please help me with this code." Watch "please help me with this code." New topic
Author

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
Bartender

Joined: Feb 26, 2001
Posts: 4419
    
    5

Please read this: ItDoesntWorkIsUseless (←click)


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

Joined: Oct 13, 2005
Posts: 36486
    
  16
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
Bartender

Joined: Jun 06, 2007
Posts: 2712
    
    5

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


SCJP, SCWCD.
|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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: please help me with this code.
 
Similar Threads
need help counting phrases in a string
Array and GUI
GUI Big trouble
Reading from console
Help with english to morse code program, I have no idea what I'm doing