import java.util.*; class Longest4 { public static void main(String[] args) throws Exception { Scanner input = new Scanner(System.in); System.out.println("Enter some words (all on one line):"); String line = input.nextLine(); String[] words = line.split(" "); List a = new ArrayList(); for(int i=0; i() { public int compare(String str1,String str2) { return str1.length()-str2.length(); } })+ "\""); } }