Guest User

Untitled

a guest
Jul 17th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. public class WordClient1
  2. {
  3. public static void main( String[] args )
  4. {
  5. Word aWord;
  6. aWord = new Word("hello");
  7.  
  8. System.out.println("aWord has:");
  9. System.out.println(aWord.toString());
  10.  
  11. aWord.findInLine("Hello World!", 1);
  12. aWord.findInLine("hello world!", 2);
  13. System.out.println(aWord.findInLine("Once upon a midnight dreary", 3));
  14. aWord.findInLine("He then said 'hello, how are you?", 4);
  15. aWord.findInLine("He then said 'hello, how are you?", 5);
  16. aWord.findInLine("He then said 'hello, how are you?", 6);
  17. aWord.findInLine("He then said 'hello, how are you?", 7);
  18. System.out.println(aWord.findInLine("He then said 'hello, how are you?", 8));
  19. aWord.findInLine("He then said 'hello, how are you?", 9);
  20. aWord.findInLine("He then said 'hello, how are you?", 10);
  21. aWord.findInLine("He then said 'hello, how are you?", 11);
  22. aWord.findInLine("He then said 'hello, how are you?", 12);
  23. aWord.findInLine("He then said 'hello, how are you?", 13);
  24. aWord.findInLine("He then said 'hello, how are you?", 14);
  25. aWord.findInLine("He then said 'hello, how are you?", 15);
  26. System.out.println("aWord has:");
  27. System.out.println(aWord.toString());
  28. } // end of method main
  29.  
  30. } // end of class WordClient1
Add Comment
Please, Sign In to add comment