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
Which of the following is one of the first steps in implementing a comprehensive security program? Setting up a Guest account Cr
yKpoI14uk [10]

Answer:

Setting a strong password policy

Explanation:

In implementing a comprehensive security program, one of the first steps would be to set up a strong password policy.

It is important to understand what the company is trying to protect from third parties.

Setting up a password policy is going to increase the security of the system through the use of strong passwords.

5 0
3 years ago
Why is it important to put the most specific case first? What types of errors does it help avoid?
lozanna [386]

Answer and Explanation:

The more specific cases require more commitment and attention from the employee. For this reason, it is necessary that the employee is less tired and more focused and, as we know, the focus decreases as the work progresses, due to tiredness. Thus, it is preferable that simpler cases that require less attention and thoroughness are placed last, while more specific cases and that require greater thoroughness are placed first, when the employee is more focused. This avoids problems of organization and functioning of the most different levels of intensity, it also avoids problems of specificity and efficiency.

8 0
3 years ago
With _________, users will receive recommendations for items liked by similar users.
iris [78.8K]

Answer:

Collaborative filtering

Explanation:

Collaborative filtering is an algorithms family in which there are various ways to determine the same users or items also there are various ways to determine the rating depending upon the same users rating

Therefore as per the given situation, the above is the answer

Hence, the same is to be considered

3 0
3 years ago
What are the commands used in windows 2012 to mount the nfs share on the linux server?
mestny [16]
Mount -o mytype=hard
5 0
3 years ago
Plz answer this....quickkkkk​
ioda
C - Puts a list of items into order
8 0
3 years ago
Read 2 more answers
Other questions:
  • How to turn a flash drive into a bluetooth adapter?
    13·1 answer
  • Each time you save a document, _____. you will need to type in the file type in which it should be saved you can select the Save
    11·1 answer
  • Which of the following controls will provide an area in the form for the user to enter a name? a. button b. label c. text box d.
    8·1 answer
  • Testing for information would be most likely to occur in which type of engineering?
    5·2 answers
  • 10.7 LAB: Fat-burning heart rate Write a program that calculates an adult's fat-burning heart rate, which is 70% of 220 minus th
    8·1 answer
  • In an information systems framework, ________ is the bridge between the computer side on the left and the human side on the righ
    14·1 answer
  • Given two strings s and t of equal length, the Hamming distance between s and t, denoted dH(s,t), is the number of corresponding
    6·1 answer
  • 1. A bank customer invested $24 in a bank with 5 percent simple interest per year, write a program the construct a table showing
    11·1 answer
  • TIMED QUIZ
    12·1 answer
  • A for construct is a loop construct that processes a specified list of objects. As a result, it is executed as long as there are
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!