import java.util.Scanner; public class Exercise05_17Extra { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.println("Enter your strings separated by spaces: "); /* Note: (1) If you test your code from Eclipse, end the input by pressing first pressing ENTER and then CTRL+Z. There is no way to signify the end of input in NetBeans. (2) If you test your code from the command window, end the input by first pressing ENTER and then CTRL+Z, and then ENTER again. (3) If you test your code from the CheckExerciseTool, just set the input in the input box. */ /* Note: When you test your code using the CheckExerciseTool, use the entire program. When you submit to REVEL, Only submit your code enclosed between BEGIN REVEL SUBMISSION and END REVEL SUBMISSION to REVEL. */ int longest; int count; // BEGIN REVEL SUBMISSION Write your code here. Only submit your code enclosed between BEGIN REVEL SUBMISSION and END REVEL SUBMISSION to REVEL. Don't forget to initialize longest and count in this part. // END OF REVEL SUBMISSION System.out.println("The longest string length is " + longest); System.out.println(count + " string" + (count > 1 ? "s have" : " has") + " the length of " + longest); } }