Guest User

Untitled

a guest
Jan 21st, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class KWICIndex {
  4. static Scanner input = new Scanner(System.in);
  5.  
  6. public static String aRotator (String firstWord){
  7. int blankIndex = firstWord.indexOf (" ");
  8. String fw = firstWord.substring(0,blankIndex);
  9. String sw = firstWord.substring(blankIndex+1, blankIndex);
  10. return firstWord;
  11.  
  12. }
  13. }
  14.  
  15. public static void main(String args[]) {
  16. String aTitle = input.nextLine();
  17. while (aTitle.length() > 0) {
  18. system.out.println(aRotator(aTitle));
  19.  
  20. }
  21.  
  22. }
Add Comment
Please, Sign In to add comment