FileDocCategorySizeDatePackage
ChangeArrayLength.javaAPI DocExample367Sun Feb 08 21:33:54 GMT 2004None

ChangeArrayLength

public class ChangeArrayLength extends Object
Can you change the .length of an array?
author
Ian F. Darwin, http://www.darwinsys.com/
version
$Id: ChangeArrayLength.java,v 1.5 2004/02/09 03:33:53 ian Exp $

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] argv)

		//+
		int[] a = new int[4];
		System.out.println(a.length);
		a.length = 5;	// EXPECT COMPILE ERROR
		//-