Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Suppose your homework assignments are located in the directory/home/me/cs101. Your instructor tells you to place your homework into packages. In which directory do you place

image text in transcribedimage text in transcribedimage text in transcribed

Suppose your homework assignments are located in the directory/home/me/cs101. Your instructor tells you to place your homework into packages. In which directory do you place the class hw1.problem1.TicTacToeTester? Select one: a. /home/me/cs101 b./home/me/cs101/hw1/problem1 c. /home/me/cs101/hw1/problem1/TicTacToeTester O d. /home/me/cs101/hw1 Clear my choice Identify the code fragments below that will compile and run correctly, remembering that Files.readAllLines() can potentially throw an IOException. You can assume that all necessary packages have been imported. Select one or more a. List getLines(String path) throws IOException { try { return Files.readAlllines (Paths.get(path)); } catch (IOException ex) { return null; } } Ib. List getLines (String path) { try { return Files.readAlllines (Paths.get(path)); } catch (IOException ex) { return null; } } Ic. try { List lines = files.readAlllines (Paths.get(path)); System.out.println(lines); } catch (IOException ex) { System.out.println(ex); } d. List getLines(String path) throws IOException { return Files.readAlllines (Paths.get(path)); } What are some situations where an uncaught exception is appropriate in Java? Select one or more a. Device is not turned on b. An object is null I c.Going out of bounds on an array d. File not found

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Medical Image Databases

Authors: Stephen T.C. Wong

1st Edition

1461375398, 978-1461375395

Students also viewed these Databases questions