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
When a program throws an exception within a method that has no try-catch block, which of the following statements about exception handling is true?
(Multiple Choice)
4.8/5
(38)
Which of the following statements about assertions is NOT true?
(Multiple Choice)
4.9/5
(43)
Under which condition will the Scanner constructor generate a FileNotFoundException?
(Multiple Choice)
4.9/5
(37)
Consider the following code snippet.
Which of the following statements about this code is correct?

(Multiple Choice)
4.8/5
(33)
Insert the missing code in the following code fragment.This fragment is intended to read a web page.

(Multiple Choice)
4.9/5
(40)
Your program wishes to open a file named C:\java\myProg\input.txt on a Windows system.Which of the following is the correct code to do this?
(Multiple Choice)
4.7/5
(41)
An example of a fatal error that rarely occurs and is beyond your control is the ____.
(Multiple Choice)
4.8/5
(31)
Insert the missing code in the following code fragment.This fragment is intended to read an input file named dataIn.txt and write to an output file named dataOut.txt.

(Multiple Choice)
4.8/5
(32)
Which of the following statements about command line arguments is correct?
(Multiple Choice)
4.8/5
(44)
Insert the missing code in the following code fragment.This fragment is intended to read an input file named hoursWorked.txt.You want the program to terminate if the file does not exist.

(Multiple Choice)
4.8/5
(42)
Assuming that inputFile is a Scanner object used to read words from a text file, select an expression to complete the following code segment, which counts the number of words in the input file.

(Multiple Choice)
4.7/5
(32)
Which method of an exception object will provide information about the chain of method calls that led to the exception?
(Multiple Choice)
5.0/5
(41)
You have opened a command prompt window and you have entered the following:
java myProg Bob Smith
Which of the following statements is correct?
(Multiple Choice)
4.9/5
(38)
Consider the following code snippet:
What characters will be ignored and not read in when using this code?

(Multiple Choice)
4.9/5
(33)
Insert the missing code in the following code fragment.This fragment is intended to read an input file named dataIn.txt that resides in a folder named payroll on the C: drive of a Windows system.

(Multiple Choice)
4.8/5
(34)
Which of the following statements about white space in Java is correct?
(Multiple Choice)
4.9/5
(46)
Insert the missing code in the following code fragment.This fragment is intended to read an input file named dataIn.txt.

(Multiple Choice)
4.7/5
(34)
Which of the following code snippets about exceptions is correct?
(Multiple Choice)
4.9/5
(37)
Your program will read in an existing text file.You want the program to terminate if the file does not exist.Which of the following indicates the correct code for the main method header?
(Multiple Choice)
4.8/5
(41)
Insert the missing code in the following code fragment.This fragment is intended to read a file named dataIn.txt and write to a file named dataOut.txt.

(Multiple Choice)
4.9/5
(42)
Showing 61 - 80 of 108
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)