Java Basic Data Structures

Java Basic Data Structures

6th - 10th Grade

15 Qs

quiz-placeholder

Similar activities

Основные понятия языка программирования PYTHON

Основные понятия языка программирования PYTHON

7th Grade

12 Qs

ptscod

ptscod

8th Grade

20 Qs

Word basics

Word basics

8th - 12th Grade

10 Qs

CLASS 7 COMPUTER CH-3 QUIZ

CLASS 7 COMPUTER CH-3 QUIZ

7th Grade

11 Qs

Kuis tipedata, flowchart informatima kelas X j4njang SMA

Kuis tipedata, flowchart informatima kelas X j4njang SMA

9th - 12th Grade

10 Qs

kiểm tra tin 8

kiểm tra tin 8

8th Grade

20 Qs

Basic Docs

Basic Docs

8th - 9th Grade

17 Qs

ÔN TẬP HKII-02

ÔN TẬP HKII-02

8th Grade

15 Qs

Java Basic Data Structures

Java Basic Data Structures

Assessment

Quiz

Computers

6th - 10th Grade

Hard

Created by

Xander Ge

Used 182+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What are for loops used for?

To run a piece of code only when a certain condition is met

To run a piece of code repeatedly until a condition is met

To run a piece of code repeatedly forever

To run a piece of code if a condition isn't met

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

How do you write a for loop?

for (int i = 0; i < 21) {}

for (int i = 0; i++) {}

for (int i = 0; i < 21; i++) {}

for (i) {}

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which is the right way to create an ArrayList of Integers?

ArrayList<Integer> list = new ArrayList<Integer>;

ArrayList Integer = new ArrayList();

Integer ArrayList = new Integer ArrayList();

ArrayList<Integer> list = new ArrayList<Integer>();

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

How do you add 21 to an ArrayList of Integers?

list.add(21);

list.put(21);

21.add(list);

list.add("21");

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which is the right way to put 21 at the second position in an ArrayList of Integers?

(Remember zero-indexing!)

list.put(2, 21);

list.add(1, 21);

list.add(2, 21);

list.add(21, 1);

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you get the third element of an ArrayList?

(Remember zero-indexing!)

list.find(2);

list.get(3);

list.find(3);

list.get(2);

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

What does this code print out?

Nothing

0

1

2

3

3

2

1

0

2

1

0

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?