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
Assume that a signal is encoded using 12 bits. Assume that many of the encodings turn out to be either 000000000000, 00000000000
Mashcka [7]

Answer:

The following is the answer to this question:

Explanation:

In the binary digit

000000000000 is equal to 0 bit

000000000001 is equal to 1 bit

1 1 1 1 1 1 1 1 1 1 1 1 is equal to 10

Similarly,

000000000010=11

Thus,

00 \ 00 \ 01 \ 10\  010101010101 is equal to

000000000000, 000000000000, 000000000001 ,

000000000010,  1 1 1 1 1 1 1 1 1 1 1 1 , 000000000001 , 000000000001 , 000000000001 ,  

000000000001 , 000000000001 , 000000000001

8 0
3 years ago
Identify and explain the three tiers of web-based applications.
prisoha [69]

In the case of three-tier architecture, the tiers are as follows: Presentation tier (also known as the user interface or the client application) Business logic tier (also known as the application server) Data storage tier (also known as the database server)

This was on google i take no credit for this work

Btw I don´t know if this is what u want

7 0
2 years ago
One of the most toxic components of a computer is the
Cloud [144]
The most common is usually lead found in the glass or some circuits in rare cases
6 0
3 years ago
Why do Linux administrators prefer to give sudo access to application teams instead of letting them su to root?
likoan [24]

Answer:

Explanation:

some distros like ubuntu do not even allow su to switch to root. furthermore the su to root is dangerous because the user becomes the all-powerful administrative account, so no warnings are issued if the application team user tries to do something system-breaking.

8 0
1 year ago
You are in charge of an event at work. You want to plan and schedule events and resourse. What type of software should you use?
Sav [38]

project management... we use this software to plan and schedule event and resources.

3 0
3 years ago
Read 2 more answers
Other questions:
  • Which of these is a subdirectory? <br> HTTPS <br> /FAQ <br> .org <br> WWW
    15·1 answer
  • The ____ function sums the numbers in the specified range and then divides the sum by the number of cells with numeric values in
    14·1 answer
  • The negotiation by the transport layer at the sender with the transport layer at the receiver to determine what size packets sho
    14·1 answer
  • In order to plan George’s birthday, his father gave him a list of people who attended his birthday for the last five years. What
    8·1 answer
  • _____ is the widely used transport layer protocol that most Internet applications use with Internet Protocol (IP).
    9·1 answer
  • MIDI is a A.technology based on placing brief digital recordings of live sounds under the control of a synthesizer keyboard. B.t
    10·1 answer
  • Given a Fahrenheit value temperatureFahrenheit, write a statement that assigns temperatureCelsius with the equivalent Celsius va
    9·1 answer
  • How does an individual's access to a wide range of online services affects their ability to operate safely in the digital world.
    5·1 answer
  • Ivan wants to have code in a game that will make it possible to change the speed of a swimmer in the game. Which of these does I
    8·1 answer
  • What is pseudo code?
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!