APCSA Unit 7 On AP Classroom Study Quiz

APCSA Unit 7 On AP Classroom Study Quiz

10th Grade

21 Qs

quiz-placeholder

Similar activities

AP Computer Science A Unit 7 Lesson 1

AP Computer Science A Unit 7 Lesson 1

Chapter 13

Chapter 13

ArrayLists and Large Data Sets Quiz

ArrayLists and Large Data Sets Quiz

Java 1D ArrayLists Quiz

Java 1D ArrayLists Quiz

AP Computer Science A Quiz

AP Computer Science A Quiz

Understanding ArrayLists in Java

Understanding ArrayLists in Java

APCSA Unit 7 On AP Classroom Study Quiz

APCSA Unit 7 On AP Classroom Study Quiz

Assessment

Quiz

Computers

10th Grade

Practice Problem

Easy

Created by

Mayank Yerragondu

Used 5+ times

FREE Resource

AI

Enhance your content in a minute

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

21 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What Is The Difference Between An Array And An ArrayList

Arrays are dynamic-size and can only store objects, while ArrayLists are fixed-size and can store primitive data types and objects.
Arrays can only store primitive data types, while ArrayLists can store both primitive data types and objects.
Arrays and ArrayLists are the same in terms of size and data types they can store.
Arrays are fixed-size, can store primitive data types and objects, while ArrayLists are dynamic-size and can only store objects.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What Exactly Is An ArrayList

An ArrayList is a dynamic array in Java that allows for the coder to add as much data values needed

An ArrayList is a fixed-size array in Java that allows for the coder to add a fixed number of values at the intialization stage

An ArrayList is a linked list in Java.

An ArrayList is a primitive data type in Java.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How Do You Intialize An ArrayList

ArrayList listName = new ArrayList<>();
ArrayList listName = new ArrayList();

ArrayL listName = new ArrayL();

ArrayList listName = new ArrayList<>;

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What Does The Add() Method Do In ArrayLists

It removes an element from the list
It multiplies two elements in the list
It divides an element by another in the list

It adds a specified element to the end of the list or at a specific part in the ArrayList

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What Does The Remove Method Do In ArrayLists

Removes the element at the specified index
Adds a new element to the ArrayList
Returns the size of the ArrayList
Updates the element at the specified index

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What Does The Set Method Do In ArrayLists

Returns the index of the specified element
Adds a new element to the end of the ArrayList
Replaces the element at the specified index with the specified element.
Removes the element at the specified index

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How Do You Return An ArrayList In A Method

public ArrayList returnArrayList() { return new ArrayList(); }
ArrayList list = new ArrayList<>(); return list;
public ArrayList returnArrayList() { ArrayList list = new ArrayList<>(); list.add("element1"); list.add("element2"); return list; }
public void returnArrayList() {

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

Already have an account?