Read 10 Names Input File Starts J Print Alphabetically First Alphabetically Last Output Fi Q37212739

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

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.