[5700] in java-interest

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

dynamic array allocation...

daemon@ATHENA.MIT.EDU (dc)
Fri Feb 23 04:39:24 1996

Date: Thu, 22 Feb 1996 22:21:35 -0800
To: java-interest@java.sun.com
From: dc <dc@symbolicsoft.com>

Can someone point me as to how to dynamically allocate an array?

        public String str[] = new String[];

gives me an 'array dimension missing' on compile.
If I allocate '5' and then add onto the end
Ideally I need a 2d array which can grow dynamically, but I'm getting stuck
on this first hurdle.....

Maybe there is some kind of container or 'list' type object that has
addItem() and deleteItem() methods? The only list thing I could find seemed
to be for pop up menus.

Or maybe you can't dynamically allocate?

Is there a good FAQ on these kind of language details?
I also need to work out how to use enumerations, can't really find such info.
A really detailed 'java vs. C++' FAQ would be good.

Sorry for all the questions, I'll do my share and help others after I stop
being such a newbie!

TIA!

dc
___________________________________________________________________

      /\    dave 'dc' collier
     /_/\     Symbolic Software, Inc.
    /_\_ \      dc@SymbolicSoft.com
   /___/__\       tel (415) 546 1295
 
         use your Head or lose your Mind!  http://www.BurnCycle.com
 


-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com

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