OCA Arrays

OCA Arrays

KG - University

10 Qs

quiz-placeholder

Similar activities

Sun and the Earth

Sun and the Earth

1st - 2nd Grade

10 Qs

Tanzanite Mine

Tanzanite Mine

9th Grade

10 Qs

ICT Unit Test Topic : DBMS - Access

ICT Unit Test Topic : DBMS - Access

8th - 12th Grade

15 Qs

Javascript 2

Javascript 2

1st Grade

13 Qs

Tree and Planar Graph

Tree and Planar Graph

University

10 Qs

PBFP - Phases of Matter

PBFP - Phases of Matter

University

10 Qs

NSS II: Physical Restraints

NSS II: Physical Restraints

Professional Development

11 Qs

The  levels of organization

The levels of organization

4th Grade

10 Qs

OCA Arrays

OCA Arrays

Assessment

Quiz

Science, Computers

KG - University

Practice Problem

Hard

Created by

T K

Used 3+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What happens when calling the following method with a non-null and non-empty

array?

It adds an element to the array the value of which is Times Square.

It replaces the last element in the array with the value Times Square.

It does not compile.

It throws an exception.

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

How many lines does the following code output?

Six

Seven

The code does not compile.

The code compiles but throws an exception at runtime.

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

How many dimensions does the array reference moreBools allow?

boolean[][][] bools, moreBools;

One dimension

Two dimensions

Three dimensions

None of the above

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is a possible output of the following code?

String[] strings = new String[2];

System.out.println(strings);

[null, null]

[,]

[Ljava.lang.String;@74a14482

None of the above

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What is the result of running the code as java Copier?

0

0 followed by an exception

1 followed by an exception

The code does not compile.

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What is the result of running the following program?

X

The code does not compile.

The code compiles but throws a NullPointerException at runtime.

The code compiles but throws a different exception at runtime.

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What does the following output?

-1

-2

-3

The output is not defined.

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?