Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Most efficient way of implementing this?

Name: Anonymous 2010-11-06 12:21

Simple situation really. Just being a bit paranoid I guess.

I have a 2D grid full of objects which I need to represent in source.

The grid contains two objects, object 1 and object 2 which both are children of object 3 which is abstract.
 
Now the thing is I can either:
1. Create an ArrayList<ArrayList> list object. ArrayLists don't care what you store in them so this would work. However it's kind of a hack since I don't really need a re sizable list with all the shit and giggles.

2. Create a packer object. That stores both of objects 1 and object 2 without problems and store then Packer[][] grid = new Packer(); .

So what does /prog/'s wisdom have to say about this? 1, 2 or some new brilliant idea?

Name: Anonymous 2010-11-06 12:32

>>6
If I make an array of type object3 I don't think Java will let me store anything but object3.
You ``don't think'' it will? Have you even tried it? Learn the fucking language before you bother other people for help.

Also object3 is abstract and I'd really love to keep it that way.
I wish there were some emoticon that could communicate my reaction to this statement.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List