Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class FindWord {
- private String find_me;
- public boolean findWord(){
- boolean retValue = false;
- String state = "";
- if( find_me == null || find_me.isEmpty() ){
- return retValue;
- }
- int find_index = 0;
- int state_index = 0;
- for( int index = 0; index < find_me.length; index ++){
- state.append( get_next_char() );
- }
- while( retValue == false ){
- if( find_me.equals( state )){
- retValue = true;
- break;
- }else{
- state.removeFirstChar();
- state.append( get_next_char() );
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement