Unit 7 Vocabulary

Unit 7 Vocabulary

13 Qs

quiz-placeholder

Similar activities

Math Quiz G7

Math Quiz G7

7th Grade

10 Qs

GXVZ81R7Q77W552U

GXVZ81R7Q77W552U

KG - University

9 Qs

8th Grade Fossil Assessment LS4-1

8th Grade Fossil Assessment LS4-1

KG - University

13 Qs

GD: Unit 4

GD: Unit 4

9th - 12th Grade

8 Qs

elanif

elanif

1st Grade

17 Qs

Graph and Tree Traversal

Graph and Tree Traversal

KG - University

15 Qs

Section 1.1 Quiz

Section 1.1 Quiz

KG - University

10 Qs

DZ65CK7DVS1IT78J

DZ65CK7DVS1IT78J

KG - University

16 Qs

Unit 7 Vocabulary

Unit 7 Vocabulary

Assessment

Quiz

others

Hard

Created by

Jason King

FREE Resource

13 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Autoboxing
Automatically wrapping a primitive type in a wrapper class object. For instance if you try to add an int value to a list, it will automatically be converted to an Integer object.
To get an object at an index from a list use listName.get(index).
Automatically converting a wrapper object like an Integer into a primitive type such as an int.
To declare an ArrayList use ArrayList name, where Type is the class name for the type of objects in the list. If you leave off the it will default to Object.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Abstract Method
A method that only has a declaration and no method body (no code inside the method).
An ArrayList can hold many objects of the same type. It can grow or shrink as needed. You can add and remove items at any index.
Automatically converting a wrapper object like an Integer into a primitive type such as an int.
Use listName.size() to get the number of objects in the list.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

ArrayList
To create an ArrayList use new ArrayList, where Type is the class name for the type of objects you want to store in the list. There are other classes that implement the List interface, but you only need to know the ArrayList class for the exam.
An ArrayList can hold many objects of the same type. It can grow or shrink as needed. You can add and remove items at any index.
To set the value at an index in a list use listName.set(index,obj).
To declare an ArrayList use ArrayList name, where Type is the class name for the type of objects in the list. If you leave off the it will default to Object.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Add
To declare an ArrayList use ArrayList name, where Type is the class name for the type of objects in the list. If you leave off the it will default to Object.
A method that only has a declaration and no method body (no code inside the method).
You can access and set values in a list using an index. The first element in a list called list1 is at index 0 list1.get(0). The last element in a list is at the length minus one - list1[list1.size() - 1].
You can add an object to the end of a list using listName.add(obj). You can add an object at an index of a list using add(index,obj). This will first move any objects at that index or higher to the right one position to make room for the new object.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Declaration
You can access and set values in a list using an index. The first element in a list called list1 is at index 0 list1.get(0). The last element in a list is at the length minus one - list1[list1.size() - 1].
Automatically converting a wrapper object like an Integer into a primitive type such as an int.
To declare an ArrayList use ArrayList name, where Type is the class name for the type of objects in the list. If you leave off the it will default to Object.
You can add an object to the end of a list using listName.add(obj). You can add an object at an index of a list using add(index,obj). This will first move any objects at that index or higher to the right one position to make room for the new object.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Creation
You can access and set values in a list using an index. The first element in a list called list1 is at index 0 list1.get(0). The last element in a list is at the length minus one - list1[list1.size() - 1].
To create an ArrayList use new ArrayList, where Type is the class name for the type of objects you want to store in the list. There are other classes that implement the List interface, but you only need to know the ArrayList class for the exam.
To set the value at an index in a list use listName.set(index,obj).
Automatically wrapping a primitive type in a wrapper class object. For instance if you try to add an int value to a list, it will automatically be converted to an Integer object.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Get
To get an object at an index from a list use listName.get(index).
A method that only has a declaration and no method body (no code inside the method).
You can add an object to the end of a list using listName.add(obj). You can add an object at an index of a list using add(index,obj). This will first move any objects at that index or higher to the right one position to make room for the new object.
Automatically converting a wrapper object like an Integer into a primitive type such as an int.

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?