Learn How to Use One-Dimensional Array in Java
This lesson will teach us how to create, manipulate and use One Dimensional Array in Java programming language with In-depth explanations, code examples, and practice lessons.
What is One Dimensional Array (1D Array) in Java
In Java programming, a One-Dimensional Array, also known as a 1D Array, is a collection of elements (values) of the same data type stored sequentially (one after another) in computer memory. A 1D Array allows us to store multiple values in a single variable, which can be accessed using an index.
Suppose we want to store the ages of 10 students. In that case, we would need to declare 10 separate variables in our Java program to store each student's age.
However, we can simplify this using a one-dimensional array. With the help of a 1D array, we can declare a single variable in our Java program that can store the ages of all 10 students at once.
Unlock This Lesson & Start Learning!
Get full access to this lesson, practical exercises, quizzes, and your Mentora AI Tutor.
Special Offer, use coupon code DWL6BC to get additional discount of 10% on all subscription. Hurry limited time offer.
1 Month
Renews at ₹259/month.
Manual renewal required.
No automatic charges.
- Premium lessons access
- Quizzes and exercises
- Mentora AI Tutor
3 Months
Equivalent to ₹219.67/month.
Manual renewal required.
No automatic charges.
- Premium lessons access
- Quizzes and exercises
- Mentora AI Tutor
6 Months
Equivalent to ₹193.17/month.
Manual renewal required.
No automatic charges.
- Premium lessons access
- Quizzes and exercises
- Mentora AI Tutor
12 Months
Equivalent to ₹179.92/month.
Manual renewal required.
No automatic charges.
- Premium lessons access
- Quizzes and exercises
- Mentora AI Tutor