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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started