Exam 11: Input/Output and Exception Handling
Exam 1: Introduction76 Questions
Exam 2: Using Objects82 Questions
Exam 3: Implementing Classes108 Questions
Exam 4: Fundamental Data Types124 Questions
Exam 5: Decisions119 Questions
Exam 6: Loops107 Questions
Exam 7: Arrays and Array Lists117 Questions
Exam 8: Designing Classes88 Questions
Exam 9: Inheritance99 Questions
Exam 10: Interfaces100 Questions
Exam 11: Input/Output and Exception Handling108 Questions
Exam 12: Object-Oriented Design104 Questions
Exam 13: Recursion99 Questions
Exam 14: Sorting and Searching100 Questions
Exam 15: The Java Collections Framework102 Questions
Exam 16: Basic Data Structures102 Questions
Exam 17: Tree Structures102 Questions
Exam 18: Generic Classes75 Questions
Exam 19: Stream Processing85 Questions
Exam 20: Graphical User Interfaces75 Questions
Exam 21: Advanced Input/Output90 Questions
Exam 22: Multithreading81 Questions
Exam 23: Internet Networking74 Questions
Exam 24: Relational Databases75 Questions
Exam 25: XML74 Questions
Select questions type
Insert the missing code in the following code fragment.This fragment is intended to allow the user to select a file to be opened.

Free
(Multiple Choice)
4.9/5
(39)
Correct Answer:
C
Select an appropriate expression to complete the header for the method below.

Free
(Multiple Choice)
4.8/5
(40)
Correct Answer:
D
The ______ method of the Scanner class specifies a pattern for word boundaries when reading text.
Free
(Multiple Choice)
4.8/5
(26)
Correct Answer:
C
Which command enables assertion checking during program execution?
(Multiple Choice)
4.9/5
(40)
Which of the following statements about character encodings is NOT true?
(Multiple Choice)
4.9/5
(34)
Insert the missing code in the following code fragment.This code is intended to open a file and handle the situation where the file cannot be found.

(Multiple Choice)
4.8/5
(37)
Consider the following code snippet:
What characters will be read in using this code?

(Multiple Choice)
4.8/5
(26)
Which method of an exception object will retrieve a description of the exception that occurred?
(Multiple Choice)
4.8/5
(39)
Which of the following statements about exception handling is correct?
(Multiple Choice)
4.7/5
(38)
Consider the following code snippet:
File inputFile = new File("input.txt");
You wish to read the contents of this file using a Scanner object.Which of the following is the correct syntax for doing this?
(Multiple Choice)
4.8/5
(38)
Consider the following code snippet.
File hoursFile = new File("hoursWorked.txt");
Your program must read the contents of this file using a Scanner object.Which of the following is the correct syntax for doing this?
(Multiple Choice)
4.9/5
(40)
Consider the following code snippet, assuming that filename represents the name of the output file and writeData outputs the data to that file:
Which of the following statements about this code is correct?

(Multiple Choice)
4.8/5
(44)
Consider the following code snippet, where data is a variable defined as a double array that is populated by the readData method for valid data:
Which of the following statements about this method's code is correct?

(Multiple Choice)
4.9/5
(45)
Consider the following code snippet:
Which of the following statements about this code is correct?

(Multiple Choice)
4.9/5
(37)
Which of the following statements about checked and unchecked exceptions is NOT true?
(Multiple Choice)
4.8/5
(38)
Complete the code fragment below, which is designed to throw an exception if String variable accountNumber has more than seven characters.

(Multiple Choice)
4.7/5
(39)
Assume inputFile is a Scanner object used to read data from a text file that contains a number of lines.Each line contains an arbitrary number of words, with at least one word per line.Select an expression to complete the following code segment, which prints the last word in each line.

(Multiple Choice)
4.9/5
(44)
Insert the missing code in the following code fragment.This fragment is intended to read characters from a text file.

(Multiple Choice)
4.9/5
(43)
Which String class method will remove spaces from the beginning and the end of a string?
(Multiple Choice)
4.7/5
(47)
Consider the following code snippet:
public static void main(String[] args) throws IOException
Which of the following statements about this code is correct?
(Multiple Choice)
4.8/5
(34)
Showing 1 - 20 of 108
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)