ok, lets say its type casted. i dont understand what the xObject becomes if the yObject is stored into it.
thanks
User Profile
Collapse
-
object declarations
just a quick questions that has been bugging me for a few days:
lets say i have some classes X and Y, and in some other part of the program, I make this declaration:
X xObject = new yObject();
What does that do?
thanks -
I wouldn't be posting here if I hadn't already looked at it. I don't understand how the parameters work for it. for ex:
system.arraycop y(the source array, the index you want to start copying from, the destination array, ?, ?)
along with those 2 question marks, where do you make the destination array?Leave a comment:
-
System.arraycopy(...)
If I have an array A and I wanted to copy it into a larger array, how would I do that with the arraycopy(...) method?
thanks -
-
Shorthand for System.out.print(...);
I've seen some people type a few letters (3 or 4) and then something else, and it automatically writes a "System.out.pri ntln();" on the line for you, and I was just wondering what you have to do to do that.
thanks -
we constructed a min-heap based priority queue, and now we have to design a graph (for use with Dijkstras algorithm) using that PQ. I just don't understand how to construct the graph. So far, I have a Graph class, a Vertex class, and an Edge class. If my vertex class is simply a name and an array of incident edges, then what is my Edge class?
the end product is suppose to be something that reads in input (in this case, a sort of map),...Leave a comment:
-
i forgot to mention that the graph needs to be an adjacency list, and that it should be implemented with an ArrayList...Leave a comment:
-
implementing a graph
Can anyone explain how to code a graph based on a priority queue? As in, what would I need to do in order to successfully implement a graph? thanks
No activity results to display
Show More
Leave a comment: