import java.io.FileNotFoundException;
import java.io.FileReader;  
import java.util.Scanner;

public class Main {
  public static void main(String[] args) throws FileNotFoundException {
	  	String[] wordList;
	  	
	  	wordList = loadFile();
	  	
	  	displayContents(wordList);
	  	
  }
  
  public static String[] loadFile() throws FileNotFoundException {
	  	FileReader myFile = new FileReader("stringBot.txt");
	  	Scanner sc = new Scanner(myFile);
        
	  	//array to store 100 String objects
	  	String[] fileContents = new String[100];
      
	  	int index = 0;
		
	  	//load contents of file into the array
		while (sc.hasNext()) {
		 String str = sc.next();
		 fileContents[index] = str;
		 index++;
		}
		
		return fileContents;
  }
  
  public static void displayContents(String[] words) {
	  for(int i = 0; i<words.length; i++) {
		  System.out.println("Word "+(i+1)+" : " + words[i]);
	  }
  }
  
  public static int getLoveCount(String[] w) {
	  int count = 0;
	  for(int i = 0; i<w.length; i++) {
		  if(w[i].equals("love")) {
			  count = count + 1;
		  }
	  }
	  
	  return count;
  }
}