|
the source code is above, still stuck with this...
I think I'm closer to understanding it though. Basically I want an array of ArrayLists, each of which needs to contain an "Edge" (my class). It needs to be so that the arraylists can only contain edges otherwise it whinges at me when I try to add an edge to it. However when I put <Edge> in the initial array definition it creates an error of generic array creation - that I'm trying to create an array of more than one type, which is wrong I want an array of ArrayLists but I want each of them to only contain edges!
I think this is the culprit line...
ArrayList[] graph = new ArrayList[nodeno];
Last edited by deanosrs; Nov 6th, 2006 at 10:59 AM.
|