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
The future of work is characterised by choose all that apply
PolarNik [594]

Answer:

where are the answer chioces

Explanation:

5 0
3 years ago
D
nadya68 [22]

Any collection of data or information that has been properly structured for quick search and retrieval by a computer is referred to as a database, often known as an electronic database.

<h3>What is electronic database?</h3>
  • Databases are designed to make it easy to save, retrieve, edit, and delete data while carrying out various data-processing tasks. In response to queries, a database management system (DBMS) retrieves data from the database.
  • Databases are briefly discussed after that. See computer science: Information systems and databases; information processing for a comprehensive explanation.
  • A file or collection of files used to store a database.
  • These files' contents can be divided up into records, each of which has one or more fields.
  • The fundamental units of data storage are fields, and each field typically contains data related to one feature or attribute of the thing that the database is describing.
  • Additionally, records are arranged into tables that contain details on the connections between their various fields.
  • A database in the strict sense offers cross-referencing capabilities, despite the fact that the term "database" is used broadly to refer to any collection of information in computer files.
  • Users can quickly search, rearrange, organize, and choose the fields in numerous records to access or produce reports on certain data aggregates using keywords and a variety of sorting instructions.

To Learn more About database Refer To :

brainly.com/question/518894

#SPJ1

5 0
1 year ago
Describe, in a general form, the equation, in time domain, that tells the voltage across a inductor, L, as a function of time wh
love history [14]

Answer:

a) V(t) = Ldi(t)/dt

b) If current is constant, V = 0

Explanation:

a) The voltage, V(t), across an inductor is proportional to the rate of change of the current flowing across it with time.

If  V represents the Voltage across the inductor

and i(t) represents the current across the inductor in time, t.

V(t) ∝ di(t)/dt

Introducing a proportionality constant,L, which is the inductance of the inductor

The general equation describing the voltage across the inductor of inductance, L, as a function of time when a current flows through it is shown below.

V(t) = Ldi(t)/dt ..................................................(1)

b) If the current flowing through the inductor is constant i.e. does not vary with time

di(t)/dt = 0   and hence the general equation (1) above becomes

V(t) = 0

4 0
4 years ago
At what times should you use your headlights?
SVETLANKA909090 [29]

Answer:

Headlights are required to be used 1/2 hour after sunset to 1/2 hour before sunrise, when windshield wipers are being used, when visibility is less than 1000 feet, or when there is insufficient light or adverse weather.

Explanation:

hope this helps

8 0
3 years ago
Read 2 more answers
In DC electrode positive, how much power is at the work clamp?
Korolek [52]

Answer:

1/3 power

Explanation:

I'm just a smart guy

7 0
3 years ago
Other questions:
  • Why should engineers avoid obvious patterns?
    13·2 answers
  • Most licensed architects are members of which association?
    13·2 answers
  • How many D-cell batteries would it take to power a human for 1 day?
    11·1 answer
  • Thermal energy storage systems commonly involve a packed bed of solid spheres, through which a hot gas flows if the system is be
    13·1 answer
  • Compute the estimated actual endurance limit for SAE 4130 WQT 1300 steel bar with a rectangular cross section of 20.0 mm by 60 m
    11·1 answer
  • The 10mm diameter rod is made of Kevlar 49. Determine the change in
    7·1 answer
  • Two routes connect an origin and a destination. Routes 1 and 2 have performance functions t1 = 2 + X1 and t2 = 1 + X2, where the
    6·1 answer
  • A Wii remote flung from a hand through a TV, with a kinetic energy of 1.44J and a mass of 4.5kg. Whats the velocity?
    6·1 answer
  • A landowner and a contractor entered into a written contract under which the contractor agreed to build a building and pave an a
    14·1 answer
  • Consider the function f(n) = n
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!