Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I have a file.txt. File: G 3 5 R 1 4 2 R 9 3 4 G 3 5 Green 55 Red 12 R 2
I have a file.txt. File:
G 3 5
R 1 4 2
R 9 3 4
G 3 5
Green 55
Red 12
R 2 9 3
G six two
G 4 5
How can I read the file in java?
- it should also keep track of:
- numLinesRead the total number of lines read.
- numOfLetter G (not count the worlds have letter G)
- numOfLetter R ( not count the worlds have letter R)
- numDuplicatesLine: not count lines have the same number: such as: G 3 5, G 3 5
- numLinesNotCount: the number of line not counted such as: G six two, Red 12, Green 55
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