![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 |
|
Programming Guru
![]() Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5
![]() |
Nothing seems amiss in the source. Maybe it's got something to do with an invalid input? Is it a compiler error or a runtime error? Could you give us a stacktrace of the error?
|
|
|
|
|
|
#12 |
|
Programmer
|
It's a compiler error. Don't know how to get a stack trace but will research and post one when I work it out...
|
|
|
|
|
|
#13 | |
|
Expert Programmer
|
Quote:
try {
...
} catch (Exception e) {
e.printStackTrace();
} |
|
|
|
|
|
|
#14 |
|
Programming Guru
![]() Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5
![]() |
Stack traces of errors (as titaniumdecoy demonstrates nicely) are just for runtime errors. Perhaps you could give us a description of the compile time error?
|
|
|
|
|
|
#15 |
|
Programmer
|
The compiler error says:
Unchecked call to add(E) as a member of the raw type java.util.ArrayList
graph[src - 1].add(addthis); |
|
|
|
|
|
#16 |
|
Programmer
|
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. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| array of listed lists | ELHEK | Java | 3 | Sep 27th, 2006 5:19 PM |
| Assigning an array of lists | deanosrs | C | 42 | Apr 13th, 2006 2:35 PM |
| changing size of an array | Eric the Red | Java | 3 | Apr 3rd, 2006 9:19 PM |
| Changing Array structures to Linked Lists? | kalulu | C | 4 | Nov 29th, 2005 7:33 AM |
| Installing IPB 2.03 | bh4575 | Other Web Development Languages | 0 | Apr 23rd, 2005 3:36 AM |