aspose file tools*
The moose likes Java in General and the fly likes reference to array element Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "reference to array element" Watch "reference to array element" New topic
Author

reference to array element

ernest mcdermott
Greenhorn

Joined: Mar 05, 2007
Posts: 28
hi everyone,
iv currently got a minimal spanning tree style piece of code. I currently have a start vertex and an edge away. Next i want to retrieve the name of the next vertex that this edge leads to.

Currently i have the following code:

where:
n is an array of vertice names
ce[i] is the chosen edge

i want the value for i, say that it represents element 3 in the array, i want this to then choose element 3 in the array of vertice names as this is the next vertice that it leads to.
im sorry if the question seems a little unclear, this is the best way i could think to propose it.
Thanks in advance
ernest mcdermott
Greenhorn

Joined: Mar 05, 2007
Posts: 28
hi all, ok iv now got it going the right direction, but the problem is that it outputs the word null as oposed to the vertex name. Can any1 suggest what might be wrong.
Thanks in advance.
 
wood burning stoves
 
subject: reference to array element