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 i make a PDF and what is a PDF<br><br> sorry i am dumb
Soloha48 [4]

Answer:

............................................

Explanation:

5 0
3 years ago
What are the reasons why is it necessary to evaluate online sources and content?
marissa [1.9K]
1) You don't know if the source is reliable. 
2) It is better to cite reliable sources so.
7 0
3 years ago
Write a method that takes a RegularPolygon as a parameter, sets its number of sides to a random integer between 10 and 20 inclus
Sergio [31]

Answer:

import java.lang.Object

import java.lang.Math

public class RegularPolygon  extends java.lang.Object{

  public void randomize(RegularPolygon c){

       int min = 10, max1 = 20;

       double  min1 = 5, max1 = 12;

       double range = (max - min) + 1;

       double range1 = (max1 -min1) + 1

       int side = (Math.random() * range) + min;

       double len = (Math.random() * range1) + min1;

       c.setNumSides(side);

       c.setSideLength( len);

 }

 public static void main(String[] args) {

    RegularPolygon r = new RegularPloygon();

    randomize(r);

 }

}

Explanation:

The randomize method accepts a regular polygon class as its only parameter and assigns a random number of sides and the length of these sides with the 'Math.random' function.

5 0
3 years ago
Kathleen has written this paragraph:
yarga [219]

Answer:

Positive media attention can transform communities in unexpected ways.

Explanation:

According to the given excerpt, it is narrated that Kathleen wrote about a town called Abbston that was recently overwhelmed by tourists as a result of the news article by a TV travel editor who wrote about the town.

Therefore, the best concluding sentence for the paragraph would be that positive media attention can transform communities in unexpected ways.

8 0
3 years ago
Read 2 more answers
What can you look for on a website to indicate that the information it presents is reliable?
dybincka [34]

There are several things you can look for on a website to help you figure out if the information is reliable. The first thing you should evaluate is the audience that the website is intended for. Is it intended for academics? School children? The general public?


The next thing you should look at is the author of the website. Is the author identified? Is the author an expert in their field? Can you establish the author's credibility? Is the author affiliated to an academic institution or credible organisation?


Look at the accuracy of the website. Check for spelling errors, proper grammar, and well-written text. Are there any sources cited? Are those sources credible?


You should also check to see when the information was published. Is the information up to date? Are all of the links up to date and functioning?


There is one last thing you can look at, and this is the domain of the website. Domains like .edu and .gov are more credible than .com or .net domains.

5 0
3 years ago
Other questions:
  • By generating and delivering timely and relevant information supported by networks, _____ creates new opportunities for conducti
    15·1 answer
  • To create a button that will allow a user to send the form data to the server you use a type of ____
    5·1 answer
  • You should use the longest possible shutter speed for all firework photographs.
    8·2 answers
  • Write a for loop to verify that your function is correctly returning the expected output for the radius values between 0 and 11.
    14·1 answer
  • Vendors who use open source as part of their product offerings can expect to bring new products to the market faster because: Gr
    11·1 answer
  • In the context of computer and network security, a security system is said to possess _____ when it does not allow data to be co
    13·1 answer
  • A swimming pool has a length of 28 feet, a width of 17 feet, and a depth of 6 feet. How much water can the swimming pool hold?
    10·1 answer
  • If an occupation is projected to decline by 7% over the next 10 years, how would you rate the job outlook? (6 points)
    14·1 answer
  • Select the three concepts of capital outlay.
    15·1 answer
  • By the mid-1990s, how did revenue generated from video games compare to revenue generated from movies?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!