Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2020
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. public class FindWord {
  2.  
  3. private String find_me;
  4.  
  5. public boolean findWord(){
  6. boolean retValue = false;
  7. String state = "";
  8.  
  9. if( find_me == null || find_me.isEmpty() ){
  10. return retValue;
  11. }
  12. int find_index = 0;
  13. int state_index = 0;
  14.  
  15. for( int index = 0; index < find_me.length; index ++){
  16. state.append( get_next_char() );
  17. }
  18. while( retValue == false ){
  19.  
  20. if( find_me.equals( state )){
  21. retValue = true;
  22. break;
  23. }else{
  24.  
  25. state.removeFirstChar();
  26. state.append( get_next_char() );
  27. }
  28. }
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement