Java-Chapter 10 Exam
Quiz
•
Computers
•
9th - 12th Grade
•
Medium
Sundi Tiller
Used 9+ 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
Create a free account and access millions of resources
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
20 questions
2.3.1 Graph Traversal & Path Finding Algorithms
Quiz
•
12th Grade - University
15 questions
Problem Solving : Design Solution
Quiz
•
12th Grade
15 questions
Virtual Private Server
Quiz
•
12th Grade
17 questions
Mobile app development principles
Quiz
•
10th Grade
15 questions
Learning Checkpoint 3: Primary & Secondary Storage
Quiz
•
9th - 10th Grade
17 questions
Security and Ethics
Quiz
•
9th - 12th Grade
21 questions
Computer System
Quiz
•
9th - 11th Grade
15 questions
Coding Quiz
Quiz
•
6th - 10th Grade
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
