Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class KWICIndex {
- static Scanner input = new Scanner(System.in);
- public static String aRotator (String firstWord){
- int blankIndex = firstWord.indexOf (" ");
- String fw = firstWord.substring(0,blankIndex);
- String sw = firstWord.substring(blankIndex+1, blankIndex);
- return firstWord;
- }
- }
- public static void main(String args[]) {
- String aTitle = input.nextLine();
- while (aTitle.length() > 0) {
- system.out.println(aRotator(aTitle));
- }
- }
Add Comment
Please, Sign In to add comment