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
VikaD [51]
3 years ago
8

Use the code below to answer the following questions. Note that the catch statements in the code are not implemented, but you wi

ll not need those details. Assume filename is a String, x is an int, a is a double array and i is an int. Use the comments i1, i2, i3, e1, e2, e3, e4, e5 to answer the questions (i for instruction, e for exception handler)
try { BufferedReader infile = new BufferedReader(new FileReader(filename)); // i1
int x = Integer.parseInt(infile.readLine( )); // i2
a[++i] = (double) (1 / x); // i3
}
catch (FileNotFoundException ex) {...} // e1
catch (NumberFormatException ex) {...} // e2
catch (ArithmeticException ex) {...} // e3
catch (ArrayIndexOutOfBounds ex) {...} // e4
catch (IOException ex) {...} // e5

An exception raised by the instruction in i1 would be caught by the catch statement labeled:

a) e1
b) e2
c) e5
d) either e1 or e5
e) either e1, e4, or e5
Computers and Technology
1 answer:
anzhelika [568]3 years ago
4 0

Answer:

d) either e1 or e5

Explanation:

Here, the instruction i1 goes ahead in trying to open the given file through an input stream buffer reader. If the given file name is wrong, it will indicate that an e1 file is not found or if any other IO errors due to invalid stream, no disc in drive e5 IO exception will be drawn.

You might be interested in
List four useful spreadsheet functions and explain what they do.
Helen [10]

Answer:

SUM, AVERAGE, MAX,MIN

Explanation:

Sum: The SUM function is categorized under Excel Math and Trigonometry functions. ... The function will sum up cells that are supplied as multiple arguments. It is the most popular and widely used function in Excel. SUM helps users perform a quick summation of specified cells in MS Excel.

Average: The AVERAGE function in Excel does exactly what you think it should. It computes the mathematical average of a set of numbers. In other words, it adds up a set of numbers and then divides the sum by how many numbers are being averaged.

Max: he MAX function will count numbers but ignore empty cells, text, the logical values TRUE and FALSE, and text values. In financial analysis, MAX can be useful in calculating the highest score, the fastest time, the highest expense or revenue amount, etc.

Min: will return the minimum value in a given list of arguments. From a given set of numeric values, it will return the smallest value. Unlike the MINA function, the MIN function ignores numbers, text, and logical values TRUE and FALSE and text values. In financial modeling.

8 0
3 years ago
Anybody want to help me figure out how to put this on a resumè
Svet_ta [14]

Answer:

OMG IM LIKE BLUSHING AS DARK AS A TOMATO RIGHT NOW

5 0
3 years ago
Diffrence betwwen RAM and ROM​
cestrela7 [59]
Answer : RAM is used to store computer programs and data that CPU needs in real time. ROM have prerecorded data and it is used to boot computer.
5 0
2 years ago
What. is. a. gradient?​
pashok25 [27]

Answer:

Gradient, in mathematics, a differential operator applied to a three-dimensional vector-valued function to yield a vector whose three components are the partial derivatives of the function with respect to its three variables. The symbol for gradient is ∇.

Explanation:

4 0
3 years ago
Read 2 more answers
c) Do hardware purchases or salaries for IT workers demand a greater share of the total cost of the ownership of the IT infrastr
atroni [7]

Answer:Yes, with increase in the need for IT, and the constant improvements in IT, there is a need to recruit Qualified IT professionals who are knowledgeable.

With new technologies developing with a fast pace,there will be a constant need to invest in IT hardwares in order to meet with the increasing challenges.

Explanation:IT(Information technology) is a term used to describe the processes through Information is sent from one point to another through one or more media.

The field of Information technology is constantly evolving with several improvements taking place around the globe, Medium sized companies will need to constantly make expenditures on both the IT infrastructures and the IT professionals both as permanent employees or as contracted experts.

6 0
3 years ago
Read 2 more answers
Other questions:
  • Which consumer document is most likely to help you if you have trouble figuring out how to operate a device
    6·1 answer
  • 1. of the following individuals, who was the most recent to develop information searching tools online? (points : 1) otlet wells
    5·1 answer
  • Which logging category does not appear in event viewer by default?
    11·1 answer
  • Write a code that makes a 2D square array with 20×20 elements. Fill the array with random numbers initially. Then, "draw" a squa
    9·1 answer
  • What do people in japan use to make anime
    5·1 answer
  • The goal of a system is to
    6·1 answer
  • 2. When you establish a connection to a remote host using Remote Desktop Connection, what appears at the top of the screen that
    15·1 answer
  • Why is the computer uses binary why not trinary?​
    11·1 answer
  • An e-commerce client is moving from on-premise, legacy systems to a cloud-based platform. During the transition, the client is a
    6·1 answer
  • What command will prevent all unencrypted passwords from displaying in plain text in a configuration file?.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!