Question: Write a JAVA program to read the following file (inputFile.txt) as input and display the output on console as shown below: (Note: The number of

Write a JAVA program to read the following file (inputFile.txt) as input and display the output on console as shown below: (Note: The number of records and data in the file may be different each time you read the file. So, you have to handle it accordingly.) Sample "inputFile.txt" [The number in each line represent the price of the fruit]

==============

Mango?120?Pakistani

Peach?100?Pakistani

Apple?150?Pakistani

Apple?300?Chinese

==============

Sample output at console or JOptionPane should be as under after reading the file

Total records found: 4

Apple,Chinese is the expensive fruit

Peach,Pakistani is the cheapest fruit .

Please solve within 50 min.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!