1. One-Dimensional Arrays in Java
1. One-Dimensional Arrays in Java
• What it is:
• A collection of elements: An array stores a group of items
(elements) of the same data type (e.g., integers, characters,
strings).
• Ordered: The elements are arranged in a specific sequence,
with each element having a unique position.
• Contiguous memory: The elements are stored in adjacent
memory locations. This allows for efficient access.
• Fixed : In many programming languages, the size of an array
is determined when it's created and cannot be changed later
without creating a new array. Some languages like python
using lists can dynamically change sizes.
How it works: