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
Consider the following code snippet:
What characters will be ignored and not read in using this code?

(Multiple Choice)
4.8/5
(26)
Select an expression to complete the program segment below, which is designed to read data from a file whose name is specified as the first command line argument.If no command line arguments are given, the program reads data from the default.txt file.

(Multiple Choice)
4.9/5
(33)
Which of the following is the correct syntax for starting a Java program named myProg from a command line if the program requires two arguments named arg1 and arg2 to be supplied?
(Multiple Choice)
4.8/5
(35)
Which of the following statements about using the PrintWriter object is correct?
(Multiple Choice)
4.8/5
(32)
Assume inputFile is a Scanner object used to read data from a text file that contains a number of lines.Some lines contain an alphabetic string, while others contain a single integer value.Select an expression to complete the following code segment, which counts the number of integer values in the input file.

(Multiple Choice)
4.8/5
(42)
Insert the missing code in the following code fragment.This fragment is intended to read an input file named dataIn.txt.

(Multiple Choice)
4.8/5
(30)
Insert the missing code in the following code fragment.This fragment is intended to write an output file named dataOut.txt that resides in a folder named reports on the C: drive of a Windows system.

(Multiple Choice)
4.7/5
(37)
When you start a Java program from a command line and supply argument values, the values ____.
(Multiple Choice)
4.9/5
(37)
Consider the following code snippet:
If the input file contains the characters 626.14 average, what values will number and result have after this code is executed?

(Multiple Choice)
4.7/5
(34)
Consider the following code snippet:
If the file cannot be located, which of the following statements about this code is correct?

(Multiple Choice)
4.9/5
(32)
You wish to use the Scanner class's nextInt() method to read in whole numbers.To avoid exceptions that would occur if the input is not a whole number, you should use the ____ method before calling nextInt().
(Multiple Choice)
4.7/5
(34)
Consider the following code snippet:
If the input file begins with the characters 626.14 average, what values will number and result have after this code is executed?

(Multiple Choice)
4.8/5
(40)
Which expression converts the string input containing floating-point digits to its floating-point value?
(Multiple Choice)
4.8/5
(43)
Which of the following statements about exception reporting is true?
(Multiple Choice)
5.0/5
(47)
If the current method in a program will not be able to handle an exception, what should be coded into the method?
(Multiple Choice)
4.7/5
(46)
Consider the following code snippet:
throw new IllegalArgumentException("This operation is not allowed!");
Which of the following statements about this code is correct?
(Multiple Choice)
4.8/5
(33)
When reading words using a Scanner object's next method, ____.
(Multiple Choice)
4.9/5
(43)
Which of the following statements about reading web pages is true?
(Multiple Choice)
4.9/5
(38)
Which of the following statements about reading and writing text files is correct?
(Multiple Choice)
4.9/5
(45)
Showing 41 - 60 of 108
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)