您的位置:寻梦网首页编程乐园Java天地Core JavaJava Lecture Notes
Introduction
Content
Apply
Reflect
Extend
previous.gif
 (3087 bytes)
next.gif
 (2959 bytes)

 
 
Content Index
Content Page # 6

Declaring arrays

The general form of an array declaration is:

<type> <identifier>; Examples of array declaration include: int shoeSizes[];
char initials[]; 
String names[];
Date appointments[];
All an array declaration does is to state that a particular identifier can refer to an array of variables of the declared type. No array is set up at this state, just the variable itself. So we can illustrate this for array initials after declaration as follows:
 
char initials []
element
value

Back to top

basicline.gif (169 bytes)

RITSEC - Global Campus
Copyright © 1999 RITSEC- Middlesex University. All rights reserved.
webmaster@globalcampus.com.eg