[390] in java-interest

home help back first fref pref prev next nref lref last post

Re: Initialization of array elements

daemon@ATHENA.MIT.EDU (Jonathan Payne)
Mon Jun 19 15:20:47 1995

Date: Mon, 19 Jun 1995 11:59:00 -0700
From: jpayne@starwave.com (Jonathan Payne)
To: Roger.Goun@East.Sun.COM
Cc: java-interest@java.Eng.Sun.COM
In-Reply-To: <9506191819.AA10147@greenberet.East.Sun.COM> (Roger.Goun@East.Sun.COM)
Reply-To: jpayne@starwave.com

That is the intended behavior.

It allocates an array that can be filled with Hashtables.  It's up to
you to fill them.  It's better this way.  It's just like in C, where
you say:

	struct foo *foos[] = (struct foo *) malloc(sizeof (struct foo *) * 10);

Would you really want it to also go do this?

	for (int i = 0; i < 10; i++)
		foos[i] = (struct foo *) malloc(sizeof (struct foo));

Probably not.
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post