STM30243 - TOPIC 4

STM30243 - TOPIC 4

9th Grade

16 Qs

quiz-placeholder

Similar activities

Arrays in Java

Arrays in Java

9th - 12th Grade

20 Qs

Arrays += Chan

Arrays += Chan

9th - 12th Grade

12 Qs

APCS A - Array 6.1,6.2,6.3,6.

APCS A - Array 6.1,6.2,6.3,6.

9th - 12th Grade

20 Qs

APCSA Unit 6 Review Arrays

APCSA Unit 6 Review Arrays

9th - 12th Grade

17 Qs

looping and branching statements in C

looping and branching statements in C

9th Grade

20 Qs

Third Day Quiz

Third Day Quiz

8th - 9th Grade

15 Qs

2D Arrays

2D Arrays

9th - 12th Grade

12 Qs

JAVA FUNDAMENTALS

JAVA FUNDAMENTALS

9th - 12th Grade

20 Qs

STM30243 - TOPIC 4

STM30243 - TOPIC 4

Assessment

Quiz

Computers

9th Grade

Medium

Created by

Nurliana Musa

Used 3+ times

FREE Resource

16 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is Exception in Java Programming?

An exception in Java is a type of variable.
An exception in Java is a method for handling errors.
An exception in Java is an event that disrupts the normal flow of the program's instructions.
An exception in Java is a class that stores data.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is ArithmeticException in Java Programming?

Arithmetic Exception is an error that occurs during arithmetic operations, such as division by zero.
Arithmetic Exception is a warning for inefficient code.
Arithmetic Exception occurs only with floating-point numbers.
Arithmetic Exception is a type of syntax error in Java.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is NullPointerException in Java Programming?

NullPointerException is an error that occurs when trying to use a null reference in Java.
NullPointerException is a method used to handle exceptions in Java.
NullPointerException occurs when a variable is declared but not initialized.
NullPointerException is a type of variable in Java.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is ArrayIndexOutOfBoundsException in Java Programming?

It is a compile-time error that prevents the program from running.
It is a runtime exception that signals an illegal access to an array index.
It is a warning that suggests optimizing array usage in the code.
It is an exception that occurs when an array is declared but not initialized.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is NumberFormatException in Java Programming?

NumberFormatException occurs when a number is too large to be stored.
NumberFormatException is an exception thrown when a string cannot be parsed as a number.
NumberFormatException is a type of runtime error.
NumberFormatException is thrown when a number is divided by zero.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Choose the code that will most likely trigger ArithmeticException in Java Programming.

int result = 10 + 0;
int result = 10 * 2;
int result = 10 - 5;
int result = 10 / 0;

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Choose the code that will most likely trigger NullPointerException in Java Programming.

Object obj = new Object(); obj.toString();
Object obj = null; obj.toString();
String str = "Hello"; str.length();
int num = 5; System.out.println(num);

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?