Forums > Java

How to put Max objects instantiated with Java into arrays ?

May 24 2012 | 5:26 pm

Hi there,

intuitively, I tried this:

JitterObject[] arrayObject

which totally failed…

I missed something here (too)
I didn’t find how to solve this by myself.

May 25 2012 | 11:17 am

I’m not sure I understand your question.

Shouldn’t it be someething like:

JitterObject arr[] = new JitterObject[100];

for ( int index = 0; index < arr.length; index++ )
arr[index] = new JitterObject( "jit.op" );

// Then you decide what you are going to do with 100 jit.ops.

May 25 2012 | 11:25 am

you answered and pointed me to that UGLY syntax error while I declared my array …
many thanks to you :)

(ps: 100 jit.ops are a bunch :)

May 25 2012 | 11:38 am

You can have either:

JitterObject[] arr = new JitterObject[100];


JitterObject arr[] = new JitterObject[100];

I don’t like that syntactic variability, but it does save you a few characters of typing if you want to declare a whole lot of arrays.

May 25 2012 | 11:45 am

oh .. ok.
so my ugly bug wasn’t there.

To be honest, I built something with JS.
This is just to experiment things, in this VERY early prototype.

(your guru’s advices around this post would be more than appreciated :) )

May 25 2012 | 11:57 am

I haven’t used the objects yet. I did see your previous post but I don’t think I have sufficiently reliable advice to offer in response to that question. Sorry.

May 25 2012 | 11:58 am

Okay Ross.
Someone else would answer maybe.

Many thanks for your help

May 25 2012 | 12:01 pm

I do hope to play around with the objects driven by Java. In Adobe Flash I very much like using actionscript to easily produce detailed highly abstract animations. It will be possible to do similar things with objects, but in 3D. However it’s one of those things I haven’t gotten around to yet.

Viewing 8 posts - 1 through 8 (of 8 total)

Forums > Java