Home Java Beginners Arrayexamples Introduction to Java Arrays



Introduction to Java Arrays
Posted on: May 28, 2007 at 12:00 AM
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). 

Related Tags for Introduction to Java Arrays:
javacarraysmemoryidedomarrayclassdatavariablesrandomiostructvariabletypevistructuretracriathisidlocationabstractlikeallocationprogramspacestofeatureramstoreespacestructuresbstrlivarusepeceinmlasmnttrcajaceclesemallallocamemolocmehowprocatdostoredtorsamewhenwhichsspdata-structureeebstatpacrackishallrayeaandaractstrsavassamssamritigthcontiguousavstabablatiallocctsfeprndonomogro


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

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.