Services
Discover
Homeschooling
Ask a Question
Log in
Sign up
Filters
Done
Question type:
Essay
Multiple Choice
Short Answer
True False
Matching
Topic
Computing
Study Set
Java Illuminated
Quiz 11: Exceptions, and Input Output Operations
Path 4
Access For Free
Share
All types
Filters
Study Flashcards
Practice Exam
Learn
Question 1
Multiple Choice
The purpose of the try and catch blocks is to:
Question 2
Multiple Choice
At run time, if a non-integer is entered, the call to the parseInt method will generate a(n) :
Question 3
Multiple Choice
Melanie writes some code with the public class EmailChecker. She uses try and catch blocks to catch thrown exceptions. A user enters this email address: Javalovre@sw.com. Which of the following is a likely outcome?
Question 4
Multiple Choice
What is the advantage of declaring a constant as static?
Question 5
Multiple Choice
Which of the following is the exception thrown by void writeObject( Object o ) ?
Question 6
Multiple Choice
ObjectOutputStream( OutputStream out ) is a:
Question 7
Multiple Choice
ObjectOutputStream is a:
Question 8
Multiple Choice
What makes an instance variable averageGPA a good candidate for being declared as transient?
Question 9
Multiple Choice
What is a token?
Question 10
Multiple Choice
Which package, introduced with Java 8, provides support for aggregate sequential and parallel operations on a collection of elements?
Question 11
True/False
PrintWriter( File f) throws a FileNotFoundException.
Question 12
True/False
A Stream can easily be constructed from an ArrayList.
Question 13
Multiple Choice
Large amounts of data reside in which of the following?
Question 14
Multiple Choice
Which of the following methods in the Exception classes returns void?
Question 15
True/False
To correct this segment, line 12 should be changed to int n = 1;. 10 public static void main( String [ ] args ) 11 { 12 int n; 13 String s = JOptionPane.showInputDialog( null, 14 "Enter an integer" ); 15 System.out.println( "You entered " + s ); 16 17 try 18 { 19 n = Integer.parseInt( s ); 20 System.out.println( "Conversion was successful." ); 21 }
Question 16
True/False
Your program will work as long as it does not generate compiler errors.
Question 17
True/False
FileNotFoundException is related to the Exception class because FileNotFoundException is a subclass of the IOException class, which is a subclass of the Exception class.
Question 18
True/False
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.