WorksheetsAP COMP SCI A: CodeHS Units 6/7/8 VOCAB
Total questions: 26
Worksheet time: 13mins
What is an Array in Java?
A data structure that can hold multiple values of the same type.
A method to store key-value pairs.
A function to iterate over a collection.
A class to create objects.
What is an Index in the context of Java Arrays?
A unique identifier for each element in the array
The size of the array
The data type of the array
The memory address of the array
What does array.length return in Java?
The number of elements in the array
The size of the array in bytes
The last index of the array
The memory address of the array
The purpose of array[index] in Java is to:
Access the element at the specified index
Change the size of the array
Sort the array
Delete the element at the specified index
What are ArrayLists in Java?
A type of array that can grow in size
A fixed-size array
A type of linked list
A type of stack
What are ArrayList Methods used for in Java?
To store elements in a dynamic array
To perform mathematical calculations
To handle file input/output operations
To manage network connections
What is an Enhanced For Loop in Java?
A loop that iterates over a range of numbers
A loop that iterates over elements of an array or collection
A loop that runs indefinitely
A loop that executes a specific number of times
What is a common error that occurs when attempting to modify an ArrayList while using an enhanced for loop?
ConcurrentModificationException
NullPointerException
IndexOutOfBoundsException
ClassCastException
The process of traversing an ArrayList is:
Iterating through each element using a loop
Accessing elements randomly
Sorting the elements
Reversing the elements
What is an algorithm?
A step-by-step procedure for solving a problem or accomplishing a task.
A type of computer hardware.
A programming language.
A software application.
Simultaneous traversal is a technique used in computer science and programming.
A method to traverse two or more data structures at the same time
A technique to sort data
A way to store data
A method to delete data
A linear search is a method for finding a target value within a list.
It checks each element of the list sequentially until a match is found or the whole list has been searched.
It divides the list into two halves to find the target value.
It uses a hash table to find the target value quickly.
It sorts the list before searching for the target value.
A selection sort is:
a sorting algorithm that divides the input into a sorted and an unsorted region
a search algorithm that finds the position of a target value within a sorted array
a method for finding the shortest path in a graph
a technique for compressing data
What is an insertion sort?
A sorting algorithm that builds the final sorted array one item at a time
A search algorithm that finds the position of a target value within a sorted array
A data structure that follows the Last In First Out (LIFO) principle
A method for finding the shortest path between nodes in a graph
Network protocols are:
rules that govern data communication
hardware devices for networking
software applications for browsing
security measures for networks
What are protocols for data sharing on the internet that define rules and conventions for communication between network devices?
HTTP
FTP
SMTP
TCP/IP
What is the appropriate use of data based on circumstances?
For making informed decisions
For spreading misinformation
For unauthorized access
For personal gain
What ensures the integrity, confidentiality, and availability of data?
Security measures
Data redundancy
User access control
Regular backups
What are arrays that store arrays, with methods associated with them being the same as regular arrays?
Arrays of arrays, also known as multidimensional arrays.
Single-dimensional arrays
Linked lists
Stacks
What is the process of traversing a 2D array by accessing all elements in a row before moving on to the next row?
Row-major order
Column-major order
Diagonal order
Zigzag order
What is the process of traversing a 2D array by accessing all values at the first column in every row, before moving to the next column?
The process is known as column-major order traversal.
The process is known as row-major order traversal.
The process is known as diagonal traversal.
The process is known as zigzag traversal.
What is the process to loop through an array and access each of the elements, with caution to avoid looping beyond the valid index values?
Use a for loop with a condition that checks the length of the array
Use a while loop without any condition
Access elements randomly without checking index
Use a do-while loop with a condition that always evaluates to true
What is an enhanced for loop in Java used for?
Iterating over arrays or collections
Declaring variables
Handling exceptions
Performing arithmetic operations
What is an alternate to a for or while loop that accesses each value in an array starting at the first value and proceeding in order?
An alternate to a for or while loop for accessing each value in an array is the forEach method.
Using a recursive function to access each value in an array.
Utilizing a do-while loop to iterate over an array.
Implementing a map function to transform array values.
What is an 'Enhanced For Loop Variable' in Java?
A variable used in a for-each loop to iterate over elements of an array or collection.
A variable used to enhance the performance of a for loop.
A variable that is declared outside the loop but used inside it.
A variable that is used to terminate a loop.
What are 'Common Array Algorithms' used for in computer science?
Common Array Algorithms are used for various operations on arrays, such as searching, sorting, and manipulating data efficiently.
Common Array Algorithms are used to create graphical user interfaces.
Common Array Algorithms are used to develop mobile applications.
Common Array Algorithms are used to design network protocols.
