Computers and Technology

Consider the code below. Note that the catch statements in the code are not implemented, but you will 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 question (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

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 10:30, hope564
Dave has to create animations for a game. which tool can dave use?
Answers: 3
image
Computers and Technology, 22.06.2019 19:00, sere50
Stacy works as blank. the most important soft skill she needs for this role is blank.
Answers: 3
image
Computers and Technology, 22.06.2019 19:20, SundaeSunday
Consider the following code snippet: #ifndef cashregister_h#define cashregister_hconst double max_balance = 6000000.0; class cashregister{public: cashregister(); cashregister(double new_balance); void set_balance(double new_balance); double get_balance() const; private: double balance[12]; }; double get_monthly_balance(cashregister bk, int month); #endifwhich of the following is correct? a)the header file is correct as given. b)the definition of max_balance should be removed since header files should not contain constants. c)the definition of cashregister should be removed since header files should not contain class definitions. d)the body of the get_monthly_balance function should be added to the header file.
Answers: 1
image
Computers and Technology, 23.06.2019 07:30, Morganwing1019
To check spelling errors in a document, the word application uses the to determine appropriate spelling. internet built-in dictionary user-defined words other text in the document
Answers: 2
Do you know the correct answer?
Consider the code below. Note that the catch statements in the code are not implemented, but you wil...

Questions in other subjects:

Konu
Mathematics, 27.08.2020 18:01
Konu
Mathematics, 27.08.2020 18:01
Konu
Mathematics, 27.08.2020 18:01