In Java,
Complete the following program skeleton for the program given below. This program should ask the user to enter a String and should loop until the user enters an empty String. If the user has entered at least one String, the program should report the longest and shortest strings entered by the user. Make sure your code produces the same output as that given in the transcript below for the input given in the transcript below.
You should get the input using the Scanner method nextLine().
Here is a sample transcript of how the program should work. Input typed by the user is indicated by bold text:
Enter a value: My
Enter a value: Good
Enter a value: Friend
Enter a value:
Longest String: Friend
Shortest String: My
import java.util.Scanner;
public class Exam2B {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
// your code goes here
}
}