import java.util.Scanner; public class StringArrayDemo { public void doTheThing() { //BTW, let me know if we should rewrite this to use a file as input Scanner input=new Scanner(System.in); String[] words=new String[50]; //There's a LOT to go over here! int count=0; //We need to keep track of this now! System.out.println("Enter terms to consider, one per line."); System.out.println("Enter a blank line when finished"); while (true) { //In-test loop time! System.out.print("> "); String entry=input.nextLine(); if ( entry.equals("") ) break; words[count++]=entry; //Does this line make sense? Also, note WHERE this is! } //We could have been adding up String lengths while receiving them, but... meh? int lengthSum=0; for ( int i=0; i~ the average length! for ( int i=0; iaverage ) System.out.println(words[i]); input.close(); //We should get in the habit of including this } public static void main(String args[]) {new StringArrayDemo().doTheThing();} }