Homework Questions? Ask a Tutor for Answers ASAP
What I need is how I can do what I described in Java, particularly the insertion of new links (between links) or deletion (from between links) of links no longer wanted. The critical thing is that in C++ (or Ada or Pascal, or any other language with pointers), I can assign a pointer to point to a pre existing object
the node class must be a new Java feature. I only have books that cover older versions of Java, so I don't know how to use the node class, or anything about it. Can you please show me how to use it? Can you please show me an example of its use to insert a new link between two preexiting consecutive links in a linked chain?
If you have to create a customized class yourself, then that class must contain objects that act as pointers (the objects of node type), and you must be able to assign these to point to preexisting nodes, but Java does not have pointers.
yes, please provide me with some example of code that demonstrates that.
The reason I chose insertion of a link into a chain, between preexisting links, is that it forces you to declare a new link dynamically ("on the heap") and also to repoint pointers, that pointed to given links, to point to other links instead, preexisting links.
I use Java version 1.6.0 I compile the code and link and execute it using its commands. I use a microsoft windows XP based personal computer. I have never heard of "Netbean" or "Eclipse". But just show me the code that you think will work, in a text file
oh, I think I understand. Any object variable automatically acts as a pointer, and you can either dynamically allocate a new value for that object pointer or assign it to another object, a preexisting object, of the same type. It finally "clicked" in my head.
I have a new question (new fee?) to ask you about Java, something else that I have done with C++ and would like to know how to do it with Java. This one involves the RandomAccessFile class, how to use it to input and output BigDecimal objects