Specifications
Sun Services
Java™ Programming Language
Module 5, slide 7 of 15
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision F
Creating Reference Arrays
Another example, an object array:
1 public Point[] createArray() {
2 Point[] p;
3
4 p = new Point[10];
5 for ( int i=0; i<10; i++ ) {
6 p[i] = new Point(i, i+1);
7}
8
9 return p;
10 }










