Home Java Beginners Arrayexamples Introduction to Java Arrays
Questions:Ask|Latest

 
 

Share on Google+Share on Google+

Introduction to Java Arrays

Advertisement
In this section you will be introduced to the concept of Arrays in Java Programming language. You will learn how the Array class in java helps the programmer to organize the same type of data into easily manageable format.

Introduction to Java Arrays

     

In this section you will be introduced to the concept of Arrays in Java Programming language. You will learn how the Array class in java  helps the programmer to organize the same type of data into easily manageable format. 

Program data is stored in the variables and takes the  memory spaces, randomly. However, when we need the data of the same type  to store in the contiguous memory allocations we use the data structures like arrays. To meet this feature java has provided an Array class which abstracts the array data-structure. 

The java array enables the user to store the values of the same type in contiguous memory allocations. Arrays are always a fixed length abstracted data structure  which can not be altered when required.

The Array class implicitly extends java.lang.Object so an array is an instance of Object.

Advantages of Java Array:

  1. An array can hold primitive types data.
  2. An array has its size that is known as array length.
  3. An array knows only its type that it contains. Array type is checked at the compile-time.

Disadvantages of Java Array:

  1. An array has fixed size.
  2. An array holds only one type of data (including primitive types). 
Advertisement

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: May 28, 2007

Related Tutorials

Ask Questions?    Discuss: Introduction to Java Arrays   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments
ronel
August 25, 2011
tutorial

i like this website because they can give more knowledge to us. specially me as a student..
Ken
February 20, 2013
Ask

Then, what is array.length? can you help me?
shvan.ali48@yahoo.com
November 2, 2011
array introduction

thank you
rahul kumar jaiswal
December 14, 2011
Array

array define primitve data bt y nt defined wraaper data type
pandian
May 31, 2012
example program

want best programme
Chaittenya
September 21, 2012
Query

In Advantages, it is shown '1.An array can hold primitive types data.' and in disadvantages - '2.An array holds only one type of data (including primitive types).' So, is this true that array can hold only primitive type values and not the Objects (however, same type in case primitive & object) ??
dance
October 20, 2012
student

I want to learn java
DMCA.com