Read in 10 names from an input file that starts with J. Printwhich is alphabetically first and which is alphabetically last toan output file. In java code.
Answer
import java.io.File;import java.io.FileNotFoundException;import java.io.PrintWriter;import java.util.Scanner;public class FirstLastName { public static void main(String[] args) { Scanner in = new Scanner(System.in); System.out.print(“Enter input file name: “); String inputFileName = in.nextLine(); try {
OR
OR