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
What is a life cycle
pochemuha

the definition of a life cycle is  the series of changes in the life of an organism, including reproduction

let me know if I helped <em>@OfficalOliviaB.</em>

4 0
3 years ago
Read 2 more answers
___ are controls through which a user can enter input data in a gui application. answer
BaLLatris [955]
Digital data<span>. Biometric </span>data<span>. Digital </span><span>data</span>
5 0
3 years ago
Which programming element is used by a game program to track and display score information
laiz [17]
I think the answer is variables.
4 0
3 years ago
Read 2 more answers
4.2.5 codehs text messages answer
N76 [4]

Answer:

public class TextMessage

{

   private String message;

   private String sender;

   private String receiver;

   

   public TextMessage(String from, String to, String theMessage)

   {

       sender = from;

       receiver = to;

       message = theMessage;

   }

   

   public String toString()

   {

       return sender + " texted " + receiver + ": " + message;

   }

}

4 0
2 years ago
What type of printer heats toner to adhere it to the paper? inkjet . impact. 3D. laser.
Luden [163]

Answer:

laser

Explanation:

These are well known printer types now.  Let's review how they work to determine in which does heat plays a role.

inkjet: inkjet printers are printer throwing ink at the paper in the form of little drops.  No heat involved here.

impact: That's the oldest technology, where a printing head is moving left and right to punch a printing ribbon and transfer ink onto the paper.  No heat involved.

3D: 3D printers don't usually use paper... as they use other materials to create a 3D representation of a model.  Heat is involved in the melting of the material before it's placed on the building model.  But no paper involved here.

laser: laser printers are working very much like a photocopier machine... memorizing the pattern to be printed, then transferring it onto paper... using heat.

8 0
3 years ago
Other questions:
  • Tom's using Google Ads to promote his bicycle store. He's created an Android App and needs to measure how effectively the curren
    14·1 answer
  • Tommy has hired a marketing company to create a billboard advertisement
    11·2 answers
  • What are the desirable qualities of a Product Vision?
    11·1 answer
  • Your friend sends you a photograph of his son. you want to enlarge the photograph. which program type will you use to make this
    15·1 answer
  • Diagnosing is solving the problem, and trouble shooting is figuring out what the problem is.
    15·1 answer
  • After which stage in the information processing cycle can data be referred for future use?
    7·1 answer
  • Conclusion for primary memory
    15·1 answer
  • Please complete the following questions. It is important that you use complete sentences and present the questions and answers w
    6·1 answer
  • You do not have to move your fingers to click the top row reach keys.<br> 1. True <br> 2. False
    15·1 answer
  • Please answer.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!