Question: Java Question I only put all line into the set, but have trouble with the output part. 1. [5 marks] Read the input one line

Java Question

I only put all line into the set, but have trouble with the output part.

Java Question I only put all line into the set, but havetrouble with the output part. 1. [5 marks] Read the input one

1. [5 marks] Read the input one line at a time until you have read all n lines and imagine these lines are numbered ., Next output lines floor(n/2 . -1 followed by lines 0, floor(n 2)-1 Your code goes here - see Parte for an example @param r the reader to read from @param w the writer to write to @throws IOException o: public static void doIt(BufferedReader r, Printwriter w) throws IOException 7 Your code goes here -see Parte for an example Set mySet-new HashSet (); for(String line -r.readLine() line nul1; line -r.readLine)) mySet.add(line)

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!