Search Header Logo

3rd Quarter Exam in JAVA 4 (Computer Programming)

Authored by Jeffmark Pinaredondo

Computers

12th Grade

Used 1+ times

3rd Quarter Exam in JAVA 4 (Computer Programming)
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

60 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is an array in Java?

A collection of non-primitive data types
A collection of primitive data types
A collection of objects

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

How do you declare an array in Java?

int arrayName[];
int[] arrayName;
Both a and b

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the index of the first element in an array in Java?

0
1
-1

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the syntax for a do-while loop in Java?

do (condition) {} while (update; initialization; condition);
do (update; condition; initialization) {} while (condition);
do {} while (condition);
do (initialization; condition; update) {} while (condition);

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the purpose of the break statement in a loop?

To skip the current iteration of the loop
To terminate the loop prematurely
To restart the loop from the beginning
To decrement the loop counter

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the purpose of the continue statement in a loop?

To terminate the loop prematurely
To restart the loop from the beginning
To skip the current iteration of the loop
To increment the loop counter

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following loop constructs can be used to create an infinite loop?

for loop
while loop
do-while loop
All of these

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?