Which of the following best describes what the following code accomplishes? Buffered Reader reader = new...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Which of the following best describes what the following code accomplishes? Buffered Reader reader = new Buffered Reader(new FileReader("in.txt")); Print Writer writer = new PrintWriter(new Buffered Writer(new FileWriter("out.txt"))); String inLine = reader.readLine(); while (inLine != null) { String outLine = ""; } for (int index = 0; index < inLine.length(); index++) { char c = inLine.charAt(index); if (c == "") { } outLine += '*'; } else { outLine += c; writer.println(outLine); inLine = reader.readLine(); reader.close(); writer.close(); It converts the input file 'in.txt' to a binary file. It copies the content from 'in.txt' to 'out.txt' one character at a time. It counts the number of commas in the input file and prints a tally (using stars) to the output file. It replaces all commas in the input file with stars and writes the result to the output file. Which of the following best describes what the following code accomplishes? Buffered Reader reader = new Buffered Reader(new FileReader("in.txt")); Print Writer writer = new PrintWriter(new Buffered Writer(new FileWriter("out.txt"))); String inLine = reader.readLine(); while (inLine != null) { String outLine = ""; } for (int index = 0; index < inLine.length(); index++) { char c = inLine.charAt(index); if (c == "") { } outLine += '*'; } else { outLine += c; writer.println(outLine); inLine = reader.readLine(); reader.close(); writer.close(); It converts the input file 'in.txt' to a binary file. It copies the content from 'in.txt' to 'out.txt' one character at a time. It counts the number of commas in the input file and prints a tally (using stars) to the output file. It replaces all commas in the input file with stars and writes the result to the output file.
Expert Answer:
Answer rating: 100% (QA)
The detailed answer for the above question is provided below Answer The correct description for ... View the full answer
Related Book For
Auditing and Assurance Services
ISBN: 978-0077862343
6th edition
Authors: Timothy Louwers, Robert Ramsay, David Sinason, Jerry Straws
Posted Date:
Students also viewed these programming questions
-
What problems, if any, are visible in the control charts in Figure 18.5.6? What action (if any) would you suggest? FIGURE 18.5.6 5 0 5 0 sebuey 0 5 0 5 0
-
a) Bridge Architects Ltd (Bridge) is a firm of architects based in Sydney. It specialises in high level modelling and drawing that is used for blueprint purposes for a variety of structures. To...
-
Peppers Lockdown produces keys for homes and cars. As Peppers is planning for next year's production, he decided to implement a high-low system to forecast future costs. With total production of...
-
Identify the accounting assumption, criteria, or objective that gives the most direction on how to account for each of the following situations: a. The owner of a business desires monthly financial...
-
The USA TODAY Snapshot titled Social Media Jeopardizing Your Job? (USA TODAY, November 12, 2014) summarized data from a survey of 1855 recruiters and human resource professionals. The Snapshot...
-
Fill in the Blank. The moving elements of a reciprocating engine are the crank, the connecting rod, and the ____________.
-
Summarize how the electron transport chain functions to produce ATP in a bacterial cell versus a eukaryotic cell. Explain whether or not the term chemiosmosis accurately illustrates this process.
-
Discuss the role of daemon processes and background services in operating systems. How do these processes differ from regular user processes, and what best practices are followed to ensure their...
-
Modern Kitchenware Co. specializes in the manufacturing and distribution of items used in the kitchen. Among its many products are microwave ovens, toasters, electric can openers, etc. Its home base...
-
According to the Wall Street Journal (WSJ), Apple, Inc. (AAPL) announced in 2013 a 7-for-1 stock split. Similarly, many other publicly traded companies have announced stocks splits. Most stock...
-
The doubling period of a bacterial population is 10 minutes. At time t = 100 minutes, the bacterial population was 60000. What was the initial population at time t = 0? Find the size of the bacterial...
-
Find the angle between the vectors u = 3i+5j and v= -2i+j - 3k. The angle between the vectors is 0 radians. (Round to the nearest hundredth.)
-
Provide a brief and specific answer to the questions posed. If you are asked for a deadline, specify the year, month and day. In 2020 there were special one-time filing extensions granted in light of...
-
Please work on this document and share back with me as soon as work on it. The below is a picture of what the working excel document looks like. Calculate the taxable income, portion of TI that is...
-
With a view to minimizing total Tax Payable for the GRE and the beneficiaries, determine the amounts and type of income that should be distributed to each beneficiary for 2017. Using the allocations...
-
IRS rules require that payroll tax records and copies of employment tax returns be retained for: 4 years from the April 15th following the tax year to which the document pertains 4 years 3 years the...
-
Which of the following raises the credibility of areport? Which of the following raises the credibility of a report? Multiple Choice avoiding predictions avoiding the use of cause-effect statements...
-
Which of the following would not be considered confidential information obtained in the course of an engagement for which the clients consent would be needed for disclosure? a. Information about...
-
Why are general controls so important in the audit teams evaluation of internal control and assessment of control risk and risk of material misstatement?
-
Auditors are interested in having independence in appearance because a. They want to impress the public with their independence in fact. b. They want the public at large to have confidence in the...
-
Under what conditions can WTO members not use MFN when dealing with one another?
-
What does most favored nation (MFN) mean?
-
Why do free trade areas develop rules of origin?
Study smarter with the SolutionInn App