Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String check = new String();
- int counter = 0;
- for loop (i = 0; i <word.length(); i++)
- {
- check == word.substring(i,i+3)
- if (check.equals([parameter])
- {
- if (word.charAt(i+4) == ' ' || word.charAt(i+4) == '.')
- {
- counter++;
- }
- }
- }
- return counter;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement