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
Tasya [4]
3 years ago
13

Insert the missing code in the following code fragment. This fragment is intended to read an input file named dataIn.txt and wri

te to an output file named dataOut.txt.
public static void main (String[] args) throws FileNotFoundException
{
String inputFileName = "dataIn.txt";
String outputFileName = "dataOut.txt";
File inputFile = new File(inputFileName);
Scanner in = ________;
...
}
Computers and Technology
1 answer:
olasank [31]3 years ago
6 0

Answer:

new Scanner(inputFile)

Explanation:

In Java when inputting a file using Scanner class. A Scanner breaks the input into tokens with the help of delimiting patterns, by default which matches the whitespaces and then the tokens that are received may be converted into values of different types by suing different next methods.

You might be interested in
How do you do basic addition and subtraction in binary, octal and hex?
olasank [31]

Explanation:

The use of numerical systems arose from the need of man to improve certain mathematical calculations as time goes.

Several factors demanded the study and application of mathematical operations using decimal numbers. Among these factors, technological advancement essentially from the first experiments in the use of electronics.

There are several numeric systems, but four of them stand out: decimal, binary, octal and hexadecimal.

The decimal system is used every day in countless ways and, no doubt, is the most important number system. He has ten digits with which can form any number through the law.

Non-decimal systems such as binary, octal and hexadecimal are critical in the areas of digital and computer techniques. Through these systems is possible to perform logical combinations and working with computer programming languages. This article will show the link between the logical circuits and these numbering systems.

2 - The Binary Numbering System

The binary numbering system is composed of only two digits:

Zero (0)

One (1)

To represent zero amount using the number 0; to represent a quantity, use the digit 1.

Assuming you need to represent the number two. Which digit you can use, if there is no number 2 in that system?

We have the following response. In the decimal system, we do not have the number ten and represent the amount of ten using the digit 1 followed by the digit 0. In this case, the number 1 means that we have a group of ten and the digit 0, no drive, which means ten.

In the binary system, do likewise. For you the amount of two, we use the digit 1 followed by the digit 0. The figure 1 means that there is a group of two elements and 0, a group of any unit, thus representing the number two.

The table below helps us to understand the differences between the decimal and binary system, using this rule. The number sequence displayed to the number nine.

Decimal

Binary

0

0

1

1

2

10

3

11

4

100

5

101

6

110

7

111

8

1000

9

1001

2.1 - System Conversion binary to Decimal System

To better understand the conversion we use a decimal number either, for example, 356. This number means:

3 x 100 + 5 x 10 + 6 x 1 = 356

Hundred ten unit

3 x 10 � + 5 x 10 � 6 x 10 + 10 = 356

We realize that the least significant digit (6) multiplies the unit (1), the second digit (5) multiplies the ten (10) and the most significant (3) multiplies the hundred (100). The sum of these results will represent the number.

In General, the formatting rule of a number is the sum of each digit multiplied by the corresponding base (in the example, the number ten) high for an index as the positioning of the digit in the number.

In another situation, we will use a binary number, for example, the number 101. We can conclude that it is equivalent to number 5 in the decimal system. Using the concept of a number, we will convert the number to the decimal system as follows:

1 0 1

1 x 2� + 0 x 2� + 1 x 2

6 0
2 years ago
I don't know what to do for these two questions
Rainbow [258]
我沒有看到問題?如果您可以在此問題上發布問題,那將非常有幫助!
6 0
2 years ago
How do you jumpstart a car in the middle of nowhere??? Explain using 2 paragraphs.
Julli [10]
Is there another car around? If not the best way would be to put the car in neutral, get the car moving, than pop the clutch (or slam into drive if it's not a manual) the key should be on to do this. This has the same effect as a starter just doesn't require a battery.<span />
7 0
3 years ago
Read 2 more answers
Cloud offers better protection compare to on premise?​
dangina [55]

Why is cloud better than on-premise? Dubbed better than on-premise due to its flexibility, reliability and security, cloud removes the hassle of maintaining and updating systems, allowing you to invest your time, money and resources into fulfilling your core business strategies.

The security of the cloud vs. on-premises is a key consideration in this debate. Cloud security controls have historically been considered less robust than onprem ones, but cloud computing is no longer a new technology. . A company running its own on-premises servers retains more complete control over security.

Believe it!!

Pls follow me.

6 0
2 years ago
Which Traffic Source dimensions does Google Analytics automatically capture for each user who comes to your site?A. Source, Keyw
LenaWriter [7]

For each user who comes to your site the google analytics automatically capture the traffic source dimensions Source, Medium, Campaign name.

<u>Explanation:</u>

Source:

  • There cannot be any reference to a website without an origin source.
  • The source is basically the origin of your traffic such as a search engine (google) or a domain (ex: Twitter).

Medium:

  • Every referral to a website also has a medium along with the source.
  • examples are -:  unpaid search, "cost per click", referral, mail.

Campaign name:

  • The campaign Name is the name referring to the google ads campaign.
5 0
3 years ago
Other questions:
  • Notes page view and Outline view are found in the<br> tab.<br> File<br> O Status<br> View<br> Page
    8·1 answer
  • Float in is an example of a(n) _____. annotation, evolution, animation, simulation
    14·1 answer
  • In Microsoft Word you can access the _______ command from the "Mini toolbar
    11·1 answer
  • Why might your digital footprint be important when you are applying for collage
    13·1 answer
  • For each of the threats and vulnerabilities from the Identifying Threats and Vulnerabilities in an IT Infrastructure lab in this
    10·1 answer
  • If we want to access files located in a directory on a remote server, which of these options would we use?
    9·2 answers
  • What is adobe photoshop?
    10·2 answers
  • While developing a network application, a programmer adds functionally that allows her to access the running program without aut
    14·1 answer
  • Assume that the message M has to be transmitted. Given the generator function G for the CRC scheme, calculate CRC. What will be
    15·1 answer
  • Is pseudocode obtained from Algorithm or is Algorithm obtained from pseudocode?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!