Java-Chapter 10 Exam
Quiz
•
Computers
•
9th - 12th Grade
•
Medium
Sundi Tiller
Used 10+ times
FREE Resource
Enhance your content in a minute
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following best describes a syntax error?
An error detected at compile-time, meaning the programmer has not followed the Java syntax rules when coding
An error detected at run-time, meaning the programmer has written valid Java statements that make no sense
An error that happens when the user enters unexpected data at an input prompt
An error that allows your program to build and run, but will eventually crash the program
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following best describes an exception?
An error that happens at compile-time because your Java code does not follow Java syntax rules
An error that happens at run-time because your Java code has attempted to do something illegal
A problem in your design that results in the program running without errors but behaving strangely
An error that happens at compile-time because you have not considered all kinds of possible user input
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following exceptions happens when you try to call a method on a null reference variable?
IndexOutOfBoundsException
ArithmeticException
NullPointerException
IllegalArgumetnException
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following exceptions happens when you try to perform an integer divide-by-zero operation?
IllegalArgumentException
NumberFormatException
DivisionException
ArithmeticException
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following exceptions would happen if you called charAt(5) on a string object that was 4 characters long?
IndexOutOfBoundsException
NullPointerException
ArithmeticException
LengthException
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given the exception message below, what can you tell about the nature of the exception? Exception in thread "main" java.lang.NullPointerException at Mystery.main(Mystery.java:11)
The exception type is a NullPointerException
The exception happened in the "Mystery.java" source file
The exception happened on line 11 in the source file
All of these are true
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
When an exception happens in your main() method, what happens if no other exception-handling code has been added?
The program displays a stack trace message and then continues
The program halts immediately and displays a stack trace
The program continues without any visible sign of the error
It depends on the nature of the exception
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
15 questions
Quiz 1
Quiz
•
1st - 12th Grade
15 questions
CSS Quarter IV QUIZ 2
Quiz
•
10th Grade
20 questions
Quiz 4
Quiz
•
1st - 10th Grade
22 questions
HTML Quiz
Quiz
•
9th Grade
16 questions
J808 LO6.2 Tools to present information
Quiz
•
10th - 11th Grade
15 questions
# REVIEW 1 DATA TYPES
Quiz
•
10th Grade
15 questions
1.1.1 The structure and function of the processor
Quiz
•
11th Grade - University
20 questions
Network topologies
Quiz
•
8th Grade - University
Popular Resources on Wayground
8 questions
2 Step Word Problems
Quiz
•
KG - University
20 questions
Comparing Fractions
Quiz
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Latin Bases claus(clois,clos, clud, clus) and ped
Quiz
•
6th - 8th Grade
22 questions
fractions
Quiz
•
3rd Grade
7 questions
The Story of Books
Quiz
•
6th - 8th Grade
