Unit 7: ArrayLists Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

add(E obj)

A

The add(E obj) method is used to insert an element into a collection such as an ArrayList or LinkedList.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

add(int index, E obj)

A

This method is used to insert an element at a specific index in an ArrayList. It shifts the existing elements to the right and increases the size of the ArrayList by one.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Algorithms

A

Algorithms are step-by-step procedures or instructions for solving problems or performing tasks. They provide clear instructions on how to solve problems efficiently.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

ArrayList

A

A dynamic data structure that allows you to store and manipulate collections of objects. Unlike arrays, ArrayLists can grow or shrink dynamically as needed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

ArrayList Algorithms

A

Refer to the various methods and operations that can be performed on an ArrayList, which is a dynamic array-like data structure in Java. These algorithms allow for efficient manipulation, retrieval, and modification of elements stored in an ArrayList.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

ArrayList constructor

A

A special method that creates an instance of the ArrayList class. It allows you to initialize an ArrayList object with specific elements or specify its initial capacity.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

ArrayList Methods

A

Built-in functions that allow us to manipulate and work with ArrayLists, which are dynamic arrays that can grow or shrink in size.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Arrays

A

A collection of elements of the same data type, stored in contiguous memory locations. They have a fixed size and can be accessed using an index.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Authentication and Access Controls

A

Refer to the processes and mechanisms used to verify the identity of users and regulate their access to computer systems or resources.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

ConcurrentModificationException

A

An exception occurs when a collection is modified while being iterated over using an iterator or enhanced for loop.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Data Structure

A

A way of organizing and storing data in a computer so that it can be accessed and used efficiently. It provides a systematic way to manage and manipulate data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Delete element from ArrayList

A

Refers to the process of removing a specific item from the list, causing the remaining elements to shift down and fill the empty space.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Encryption

A

The process of converting plain text into a secret code to protect sensitive information from unauthorized access.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Enhanced For Loop (For-each Loop)

A

A simplified loop structure introduced in Java that allows easy iteration over arrays or collections without explicitly managing an index or iterator.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Firewalls

A

Security systems that monitor and control incoming and outgoing network traffic based on predetermined security rules, protecting networks from unauthorized access or malicious activities.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Import Statement

A

In Java is used to bring classes or packages from other libraries into your current program. It allows you to use those classes or packages without having to fully qualify their names.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Initial capacity

A

Refers to the starting size or capacity allocated for an ArrayList when it is created using its constructor. It determines how many elements can be stored in the list before it needs to dynamically resize itself.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Insert element in ArrayList

A

Refers to adding a new element at a specific position within the ArrayList. This operation shifts existing elements to accommodate the new element and maintains the order of the remaining elements.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Insertion Sort

A

A simple sorting algorithm where each iteration removes one element from an input data set and inserts it into its correct position within a partially sorted list until all elements are inserted.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Intrusion Detection Systems

A

Security tools designed to detect unauthorized access attempts or suspicious activities within computer networks or systems.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Java Collections Framework

A

A set of classes and interfaces in Java that provide implementations of common data structures like lists, sets, and maps. It offers a unified interface for working with collections of objects.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Linear Search

A

A simple searching algorithm that sequentially checks each element in a list until it finds the target value or reaches the end of the list.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Selection Sort

A

A simple sorting algorithm that repeatedly finds the minimum element from an unsorted portion of the list and swaps it with the first element of that portion until the entire list is sorted.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

size()

A

A method that is used to determine the total number of elements present in a collection, such as a list or array.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

Traversing ArrayLists

A

Refers to the process of accessing and examining each element in an ArrayList. It involves iterating through the elements sequentially, usually using a loop.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

Wrapper Classes

A

Classes in Java that provide a way to wrap primitive data types into objects. They allow us to perform operations on primitives as if they were objects.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

ArrayLists

A

Dynamic arrays that can grow and shrink dynamically as needed. They provide resizable arrays with additional methods for easy manipulation and management.

28
Q

Autoboxing

A

The automatic conversion of a primitive data type to its corresponding wrapper class object. For example, when an int is assigned to an Integer object, autoboxing occurs.

29
Q

Constructor

A

A special method within a class that is used to initialize objects of that class. It is called automatically when an object is created and helps set initial values for its attributes.

30
Q

Deques

A

Short for double-ended queues, are data structures that allow insertion and removal of elements from both ends. They can be used to implement stacks and queues efficiently.

31
Q

Generics

A

In Java allow you to create classes and methods that can work with different types (e.g., integers, strings) without sacrificing type safety. They provide flexibility and reusability in your code.

32
Q

LinkedLists

A

Linear data structures where each element, called a node, contains a reference to the next node in the sequence. They provide efficient insertion and deletion operations but have slower access times compared to arrays.

33
Q

Maps

A

Also known as dictionaries or associative arrays, are data structures that store key-value pairs. They allow efficient retrieval of values based on their corresponding keys.

34
Q

Type Checking

A

Refers to the process of verifying whether the usage of types in a program is consistent with their definitions. It helps catch errors at compile-time by ensuring that operations are performed on compatible types.

35
Q

Unboxing

A

The automatic conversion of a wrapper class object to its corresponding primitive data type. For example, when an Integer object is assigned to an int variable, unboxing occurs.

36
Q

get(int index)

A

A method that is used to retrieve the element at a specific index in an array or list.

37
Q

remove(int index)

A

A method that is used to delete an element from a list at a specific index position.

38
Q

set(int index, E obj)

A

A method that is used to replace an element in a list at a specific index position with a new element.

39
Q

add()

A

A method that is used to insert an element into a data structure, such as a list or set.

40
Q

Enhanced For Loop

A

Also known as a foreach loop) is a simplified way to iterate over elements in an array or collection. It automatically handles indexing and provides an easy way to access each element without explicitly using indices.

41
Q

For Loop

A

A control flow statement that allows you to repeatedly execute a block of code for a specified number of times or until certain conditions are met.

42
Q

get()

A

A method that is used to retrieve the value of an element at a specific index in a list or array.

43
Q

IndexOutOfBoundsException

A

An exception that occurs when trying to access an invalid index position within an array or collection.

44
Q

remove()

A

A method removes an element from a collection, if it exists, and returns true. If the element doesn’t exist, it returns false.

45
Q

set()

A

Acollection of unique elements with no specific order. It does not allow duplicate values.

46
Q

size()

A

A method is used to determine the total number of elements present in a collection, such as a list or array.

47
Q

% operator (modulus)

A

Also known as the modulus operator, returns the remainder of a division operation. It is used to find the remainder when one number is divided by another.

48
Q

+= operator

A

An operator is known as an assignment operator. It adds the value on the right-hand side of the operator to the variable on the left-hand side and assigns the result back to that variable.

49
Q

boolean

A

A data type that can only have two possible values - true or false. It is often used in programming to make decisions and control the flow of a program.

50
Q

get

A

This term refers to retrieving the value of a variable or an object’s property.

51
Q

if statement

A

A programming construct that allows the execution of a block of code only if a certain condition is true.

52
Q

Private

A

In the context of programming, refers to a visibility modifier that restricts access to certain variables or methods within a class. It means that only other members of the same class can access those private elements.

53
Q

return

A

A keyword is used in functions/methods to send back a value to the caller. It terminates the execution of a function and passes control back to where it was called from.

54
Q

Binary Search

A

An efficient algorithm used to locate a target value within a sorted array by repeatedly dividing the search interval in half.

55
Q

Linear/Sequential Search

A

A simple searching algorithm that checks each element in a list one by one until it finds a match or reaches the end of the list. It is commonly used when there is no specific order or structure to the data.

56
Q

Ascending Order

A

Refers to arranging items in increasing numerical or alphabetical value. The smallest value comes first, followed by larger values.

57
Q

Descending Order

A

Refers to arranging items or numbers from highest to lowest value.

58
Q

Merge Sort

A

An efficient, comparison-based sorting algorithm that divides an unsorted list into smaller sublists, sorts those sublists recursively, and then merges them back together to obtain a sorted list.

59
Q

Pseudocode

A

A simplified programming language that uses plain English to outline the logic of a program. It helps programmers plan and communicate their ideas before writing actual code.

60
Q

Runtime Comparisons

A

Refer to the analysis and evaluation of the efficiency and speed of different algorithms or programs during execution.

61
Q

Sorting

A

Refers to arranging a collection of items in a specific order, such as ascending or descending order, based on certain criteria.

62
Q

Swap

A

Refers to exchanging the values of two variables or elements in an array. It allows you to rearrange data without losing any information.

63
Q

Traverse

A

Refers to the process of accessing each element in a data structure (such as arrays or linked lists) one by one, usually for performing some operation on them.

64
Q

Ciphers

A

Algorithms used for encryption and decryption of messages or data. They transform plaintext (original message) into ciphertext (encrypted message) using specific rules or keys, making it difficult for unauthorized individuals to understand or access sensitive information.

65
Q

Cryptography

A

Refers to techniques used for secure communication in the presence of adversaries. It involves encoding information in such a way that only authorized parties can understand it.

66
Q

Encapsulation

A

Refers to the bundling of data and methods within a class, where the data is hidden from external access. It ensures that an object’s internal state remains consistent by controlling how it can be accessed or modified.

67
Q

Hash Functions

A

Mathematical algorithms that take an input (or message) and produce a fixed-size string of characters, which is typically a hash value or hash code. The output is unique to the input, meaning even a small change in the input will result in a significantly different hash value.