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
It is legal to have more than one catch block to match a try block.
(True/False)
4.9/5
(30)
Assuming numberStream is a Stream containing doubles, the following code is adding all the doubles in the Stream that are greater than 5.0.
double sum =
numberStream.mapToDouble( item -> Double.parseDouble( item ) )
.filter( price -> price > 5.0 )
.sum( );
(True/False)
4.9/5
(38)
Tyler wrote a code that includes multiple catch blocks to catch files not found and characters that are not integers. Predict what will happen if a user enters an invalid file and also enters a 1.5 for the integer.
(Essay)
4.9/5
(32)
When reading objects from a file, until we have reached the end of the file, the condition for the while loop inside a try block is:
(Multiple Choice)
4.9/5
(44)
For an object of a class to be written to a file, that class must implement the __________ interface.
(Short Answer)
4.8/5
(43)
Code that could generate a checked exception must be coded with a try and catch block or placed inside a method that throws that exception itself.
(True/False)
4.9/5
(34)
When we open a file for writing and the file already exists:
(Multiple Choice)
4.7/5
(39)
Your program will work as long as it does not generate compiler errors.
(True/False)
4.7/5
(39)
The __________ class encapsulates the concept of a Uniform Resource Locator.
(Short Answer)
4.7/5
(38)
Professor Simmons had a text file of students in his first-year economics class last semester. This semester, he has all new students. What action should he take to create a useful file for this semester?
(Multiple Choice)
4.8/5
(30)
Sydney accidentally entered .5 instead of 5 in a code asking that she input an integer. She did not get a compiler error, but the program did not run because it generated an exception, which terminated the program.
(True/False)
4.9/5
(33)
Which classes can we use to create a Stream from a file in a single statement?
(Multiple Choice)
4.8/5
(38)
When we open a file for appending and the file does not exist, what will happen?
(Multiple Choice)
4.9/5
(44)
Showing 21 - 40 of 77
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)