public static void main(String[] args) throws FileNotFoundException { // Tell Java that the program might throw a FileNotFoundException
		File f = new File("wordlist.txt"); // Create a file object from the wordlist.txt file
		Scanner wordlist = new Scanner(f); // Create a Scanner to read through the file
		
		Scanner s = new Scanner(System.in); // Create a Scanner to get user input through the console
		
		System.out.println("Please enter the large word:"); // Prompt the user to enter the large word
		String bigWord = s.next(); // The big word is the next token entered by the user
		
		ArrayList<String> littleWords = new ArrayList<String> (); // Create an ArrayList to fill with the words that fit inside the big word
		
		int[] bigWordFrequency = letterFrequency(bigWord); // Get the frequency of all the letters in the big word
		
		boolean wordPossible = true; // This variable stores whether or not a given word in the wordlist can be created from the letters in the big word
		for (String word = ""; wordlist.hasNext(); word = wordlist.nextLine()) { // Initialize the String word to an empty string, loop while the wordlist Scanner has input, set word to the next line of the wordlist Scanner's input feed each iteration
			int[] charCounts = letterFrequency(word); // Get the frequency of the letters in the current word
			
			for (int i = 0; i < 26; i ++) { // For each entry in the character frequency counts:
				if (charCounts[i] > bigWordFrequency[i]) { // The little word fits in the big word if and only if the frequency count of every letter in the small word is at most as large as the frequency count for the corresponding word in the big word. This if tests for the converse of that, i. e. it checks if the little word cannot fit in the big word
					wordPossible = false; // The little word does not fit inside the big word, so set wordPossible to false
					break; // Leave the loop because we don't need to check any other letters
				}
			}
			
			if (wordPossible) { // If the little word fits in the big word:
				littleWords.add(word); // Add the word to the list of little words
			}
		}
		
		for (String word : littleWords) { // Loop through each word in the list of little words
			System.out.println(word); // Print out the word
		}
		
		wordlist.close(); // Close the wordlist Scanner
		s.close(); // Close the Scanner for user input
	}