1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Makovka662 [10]
3 years ago
5

Write a static method named fixSpacing that accepts a Scanner representing a file as a parameter and writes that file's text to

the console, with multiple spaces or tabs reduced to single spaces between words that appear on the same line.

Engineering
1 answer:
Umnica [9.8K]3 years ago
8 0

Answer:

See the code and explanation below

Explanation:

Is neccesary that accepts a Scan  representing a file as a parameter and writes that file's text on the language, and we need to reduce the multiple spaces to single spaces between  words that appear using just one line. Each word is to appear on the same line  in output as it appears in the file. We need to consider that the lines can be blank.

The code on Jave is this one:

public void DavidSpaces(Scan sc) {

   while(sc.hasNextLine()) {

       String line = sc.nextLine();

       Scanner linesc = new Scan(line);

       while(linesc.hasNext())

           System.out.print(linesc.next() + " ");

       System.out.println();

   }

}

The algorithm scheme is given on the picture attached.

You might be interested in
A kitchen contains one section of counter that's 20 inches
Ne4ueva [31]

The number of receptacles that are needed for all of these kitchen areas are: C. Four.

<h3>What are receptacles?</h3>

Receptacles can be defined as types of sockets or series of outlets (openings) that provides a path where current can be taken in a wiring system, so as to run electrical appliances in buildings.

Based on the information provided, the number of receptacles that are needed for all of these kitchen areas are four because one would be used in each area.

Read more on receptacles here: brainly.com/question/23839796

#SPJ1

4 0
2 years ago
(40%) A bank wants to store the account number of its customers (an 8-digit number) in encrypted form on magnetic stripe ATM car
9966 [12]

Answer:

Explanation:

Attached is the solution to the question

3 0
3 years ago
Where can you find free air pods that look real
Tema [17]
You can find air pods that look real on letgo. or you can go to wish.com but if you want a good pair jus get the real ones
7 0
3 years ago
A furniture manufacturer purchases a drill press machine enabled with 5G and edge computing capabilities to keep the machine ope
Andreas93 [3]

A lot of manufacturer often uses 5G machines. How these capabilities could help improve safety of the operators is that it does includes an emergency switch for the operator so that one can manually shut off when needed.

<h3>Edge computing with 5G</h3>

  • The edge computing along with 5G network and IoT devices can help put together  different safety features and limitations and on can use them to known the unsafe action and also data can be communicated.

Edge computing when use with 5G produces good opportunities in all industry. It is known to help bring computation and data storage close to where data is been produced and it enable good data control, reduced costs, etc.

Learn more about 5G network from

brainly.com/question/24664177

8 0
2 years ago
An electric field is expressed in rectangular coordinates by E = 6x2ax + 6y ay +4az V/m.Find:a) VMN if point M and N are specifi
Fittoniya [83]

Answer:

a.) -147V

b.) -120V

c.) 51V

Explanation:

a.) Equation for potential difference is the integral of the electrical field from a to b for the voltage V_ba = V(b)-V(a).

b.) The problem becomes easier to solve if you draw out the circuit. Since potential at Q is 0, then Q is at ground. So voltage across V_MQ is the same as potential at V_M.

c.) Same process as part b. Draw out the circuit and you'll see that the potential a point V_N is the same as the voltage across V_NP added with the 2V from the other box.

Honestly, these things take practice to get used to. It's really hard to explain this.

3 0
3 years ago
Other questions:
  • Is CO, an air pollutant? How does it differ from other emissions resulting from the combustion of fossil fuels?
    7·1 answer
  • A 3-kg block rests on top of a 2-kg block supported by, but not attached to, a spring of constant 40 N/m. The upper block is sud
    14·2 answers
  • Air enters the compressor of an ideal Brayton refrigeration cycle at 100 kPa, 270 K. The compressor pressure ratio is 3, and the
    13·1 answer
  • You will be observing laminar-turbulent transition for room temperature (about 20°C) water flowing in a 0.602"" ID pipe (Schedul
    8·1 answer
  • ITS FOR DRIVERS ED!!
    13·2 answers
  • सत्य से अधिक उपयोगी एवं आज्ञापालन से श्रेष्ठ क्या है ?<br>answer fast plz​
    9·1 answer
  • Solve the inequality. Then graph your solution.<br> -9v – 10 &lt; 7y +6
    14·1 answer
  • Who invented engineering first?​
    12·1 answer
  • Why does my delivery date keep changing on my tesla model 3
    13·1 answer
  • Why does my man bun not have its own erodynamics
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!