Exam 11: Exceptions, and Input Output Operations
Exam 1: Introduction to Programming and the Java Language47 Questions
Exam 2: Programming Building Blocks- Java Basics57 Questions
Exam 3: Object-Oriented Programming, Part 1: Using Classes62 Questions
Exam 4: Introduction to Graphical Applications57 Questions
Exam 5: Flow of Control, Part 1: Selection68 Questions
Exam 6: Flow of Control, Part 2: Looping67 Questions
Exam 7: Object-Oriented Programming, Part 2: User-Defined Classes78 Questions
Exam 8: Single-Dimensional Arrays63 Questions
Exam 9: Multidimensional Arrays and the Arraylist Class62 Questions
Exam 10: Object-Oriented Programming, Part 3: Inheritance, Polymorphism, and Interfaces61 Questions
Exam 11: Exceptions, and Input Output Operations77 Questions
Exam 12: Graphical User Interfaces Using Java FX89 Questions
Exam 13: Recursion59 Questions
Exam 14: An Introduction to Data Structures69 Questions
Exam 15: Running Time Analysis56 Questions
Exam 16: RGB Colors, Decimal Conversion, Java Naming, and Random Number Generation110 Questions
Select questions type
An exception can only be thrown by a method that is not a constructor.
(True/False)
4.9/5
(33)
The PrintWriter class is designed for converting basic data types to characters and writing them to a text file.
(True/False)
4.8/5
(36)
The Java package that provides most classes for reading from and writing to files is java.io.
(True/False)
4.9/5
(33)
What is the purpose of the following code segment?
13 String flightRecord1 = "AA123,BWI,SFO,235,239.5";
14 Scanner parse = new Scanner( flightRecord1 );
15 // set the delimiter to a comma
16 parse.useDelimiter( "," );
(Essay)
4.9/5
(37)
When we open a file for appending and the file already exists:
(Multiple Choice)
4.8/5
(34)
To read from the file favoriteMovies, what information do you need?
(Multiple Choice)
4.9/5
(30)
Which method of the class Scanner do we use to set the delimiter when parsing a string?
(Multiple Choice)
4.9/5
(34)
Which of the following is the exception thrown by void writeObject( Object o )?
(Multiple Choice)
4.9/5
(34)
Replacing the contents of a file with new data is called appending the file.
(True/False)
4.8/5
(27)
Which of the following is the best constructor for reading objects from a file?
(Multiple Choice)
4.7/5
(36)
We can use a lambda expression as an alternative to implementing a functional interface.
(True/False)
4.8/5
(37)
What method of the Collection class can we use to convert an ArrayList to a Stream?
(Multiple Choice)
4.8/5
(40)
Suppose you write a program using the Scanner class to read data from a text file. The file is not found, but the code instantiating the Scanner was inside a try block. Predict what will happen, and explain why this is advantageous.
(Essay)
4.9/5
(32)
The header of a method that potentially generates an exception when called contains the keyword:
(Multiple Choice)
4.9/5
(43)
Which package, introduced with Java 8, provides support for aggregate sequential and parallel operations on a collection of elements?
(Multiple Choice)
4.9/5
(38)
Showing 41 - 60 of 77
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)