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 can I get a refund of my money back
irakobra [83]

Say you got a dress from Macys but you dont like or it doesnt fit whitin 30 days usally you can take it back(with receipt . Most of the time you must show whoever you want the refund from a receipt.

4 0
4 years ago
Read 2 more answers
Write a function called show_info that takes a name, a home city, and a home state (a total of 3 arguments) and returns a full s
Delicious77 [7]

Answer:

Below are the function for the above question in java Language---

void show_info(String name,String home,String state)

    {

        System.out.println("Your name is "+name+" and you live in "+ home+" ,"+state +".");

    }

Output:

  • If the user inputs name="Gaus",city="LosAngeles" and state="California" then the output will be "Your name is Gaus and you live in LosAngeless, California."

Explanation:

  • The above function is in java language which takes three argument names, state, and the city.
  • The name will be stored on the name variable of the string type.
  • The state will be stored on the state variable of string type.
  • The city will be stored on the city variable of the string type.
  • Then the Output will be displayed with the help of the print function.
  • '+' is used to merge the string.
5 0
3 years ago
Attributes of a website indicates a more reliable source of information
Blababa [14]
If it is a government website with the .gov url it is more reliable.
6 0
3 years ago
____ devices are high-performance storage systems that are connected individually to a network to provide storage for the comput
k0ka [10]

Answer:

The correct answer to the following question will be Option A "Network Attached Storage (NAS)".

Explanation:

  • Network-connected storage is indeed a document-level data storage server based to a communications network providing information accessibility to a heterogeneous collection of users.
  • The NAS is experienced in supporting files by hardware, code or modification.

The other three option are not able to perform such type of tasks. Therefore, Option A is the right answer.

5 0
4 years ago
Consider the following scenario. As you troubleshoot the problem, what motherboard device would be the first to
prohojiy [21]
Check if the board is getting power, if it isn’t, than you may have a power supply issue.
8 0
3 years ago
Other questions:
  • Modify the program so that it can do any prescribed number of multiplication operations (at least up to 25 pairs). The program s
    10·1 answer
  • PLEASE HELP ASAP i will mark brilliant
    12·2 answers
  • Need 2.5 Code Practice Answers
    14·2 answers
  • (Package Inheritance Hierarchy) Package-delivery services, such as FedEx®, DHL® and UPS®, offer a number of different shipping o
    10·1 answer
  • Reversing the elements of an array involves swapping the corresponding elements of the array: the first with the last, the secon
    11·1 answer
  • In general, what are reasons that someone would choose to use lossy compression? Write a brief response below including at least
    10·1 answer
  • Assuming that a user enters 5 as the age, what is the output of the following code snippet? int age = 0; Scanner in = new Scanne
    10·1 answer
  • Why would a network administrator want to filter certain ports when capturing data such as FTP traffic
    6·1 answer
  • Write a function, AvgList, that takes a single argument, a list, and returns the average (mean) of the numbers in the list. You
    10·1 answer
  • Match each type of video camera to its features:
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!