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
Big Java Binder Early Objects
Quiz 11: Inputoutput and Exception Handling
Path 4
Access For Free
Share
All types
Filters
Study Flashcards
Practice Exam
Learn
Question 61
Multiple Choice
Select an expression to complete the program segment below, which displays an error message and terminates normally if String variable accountNumber does not contain an integer value. try { Int number = Integer.parseInt(accountNumber) ; } Catch ( ________________________ ) { System.out.println("Account number is not an integer value") ; }
Question 62
Multiple Choice
Consider the following code snippet: Scanner in = new Scanner(. . .) ; While (in.hasNextInt() ) { ) . . } Under which condition will the body of the while loop be processed?
Question 63
Multiple Choice
Consider the following code snippet: throw IllegalStateException("This operation is not allowed!") ; Which of the following statements about this code is correct?
Question 64
Multiple Choice
Consider the following code snippet: System.out.printf("%-12s%8.2f",description,totalPrice) ; Which of the following statements is correct?
Question 65
Multiple Choice
What is the purpose of the throw statement?
Question 66
Multiple Choice
You have opened a command prompt window and you have entered the following: java myProg Bob Smith Which of the following statements is correct?
Question 67
Multiple Choice
Consider the following code snippet: Scanner in = new Scanner(. . .) ; While (in.hasNextInt() ) { ) . . } Under which condition will the body of the while loop be processed?
Question 68
Multiple Choice
Consider the following code snippet: Scanner in = new Scanner(. . .) ; In) useDelimiter("[A-Za-z]+") ; What characters will be read in using this code?
Question 69
Multiple Choice
Consider the following code snippet: Scanner in = new Scanner(. . .) ; Int ageValue = in.nextInt() ; If there is no integer number appearing next in the input, what will occur?
Question 70
Multiple Choice
Which of the following statements about command line arguments is correct?
Question 71
Multiple Choice
Consider the following code snippet: throw new IllegalArgumentException("This operation is not allowed!") ; Which of the following statements about this code is correct?
Question 72
Multiple Choice
Select an appropriate expression to complete the header for the method below. public void openFile(String inputFile) ______________________________ { File theFile = new File(inputFile) ; Scanner data = new Scanner(theFile) ; // additional statements to input data from file }
Question 73
Multiple Choice
Consider the following code snippet. Scanner in = new Scanner(. . .) ; While (in.hasNextDouble() ) { Double input = in.nextDouble() ; } Which of the following statements about this code is correct?
Question 74
Multiple Choice
When you start a Java program from a command line and supply argument values, the values ____.
Question 75
Multiple Choice
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.