1/42
Flashcards to help review key concepts, definitions, and operations related to arrays in Java based on the lecture notes.
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
Array
An ordered list of values in programming.
ArrayList
A class in Java used to organize a list of objects internally using an array.
Array Declaration
The syntax used to create an array in Java.
Array Element
A specific value stored at an index in an array.
Index
A numerical representation of the position of an element in an array.
Bounds Checking
A process that ensures an array index is within valid limits.
ArrayIndexOutOfBoundsException
An exception thrown when an illegal index is accessed in an array.
Length Attribute
A public constant in an array object that stores the number of elements.
Initializer List
A syntax used to instantiate and fill an array with values in one step.
Method Parameter
A variable used in a method declaration to accept values.
Variable Length Parameter List
A method parameter that can accept a variable number of arguments.
Two-Dimensional Array
An array structured in a grid format, consisting of rows and columns.
Multidimensional Array
An array that can store values in more than two dimensions.
Primitive Type
Basic data types provided by the programming language like int, char, etc.
Object Reference
A reference in Java pointing to an object in memory.
NullReferenceException
An exception thrown when trying to access or modify a null reference.
For-Each Loop
A loop construct used to iterate over elements in an array.
Automatic Bounds Checking
The automatic enforcement of valid range for array indices by Java.
Adding Elements to an Array
The process of assigning a value to a specific index in an array.
Accessing Array Elements
Referring to specific elements in an array using their index.
Passing Arrays as Parameters
Sending an entire array to a method for processing.
String Array
An array that stores references to String objects.
Creating Arrays of Objects
The process of declaring an array to hold objects.
Command-Line Arguments
An array of Strings passed to the main method at program execution.
Number of Elements
The actual count of entries in an array determined by its length.
Array Instantiation
The creation of an actual array instance in memory.
Array Initialization
The process of assigning initial values to the elements of an array.
Array Size
The maximum capacity of an array, defined at the time of declaration.
Off-By-One Error
An logic error in programming where the indexing is off by one.
Arrays of Colors
An array specifically created to store color values or objects.
Reference Variable
A variable that holds the address of an object in memory.
Sorting Algorithms
Techniques applied to rearrange the elements of an array in a specific order.
Searching Algorithms
Methods used to locate a specific element within an array.
Array of Primitive Types
An array that stores basic data types like integers or characters.
Array of Compound Types
An array that contains references to more complex data types or objects.
Dynamic Array
An array whose size can change at runtime, often managed through ArrayList.
Fixed Size Array
An array with a clearly defined capacity that cannot be altered after creation.
Accessing Length Property
Using the .length attribute to get the size of an array.
Storing Object References
Holding references to objects in an array instead of the objects themselves.
Creating Constructors for Arrays
Defining special methods to create arrays with specified characteristics.
Array of Strings Example
int[] values = {1, 2, 3, 4}; demonstrates initializing an array in Java.
Multi-dimensional Array Example
int[][] grid = new int[3][3]; demonstrates creating a 2D array.
Using the for-each loop
for (int score : scores) iterates through an array of scores.