View Single Post
Old 01-02-2001, 02:42 AM   #6
Paul Victorey
Member (12 bit)
 
Paul Victorey's Avatar
 
Join Date: Mar 1999
Location: MN or WI
Posts: 3,017
You shouldn't even need to use any of the advanced features of the compiler-specific java classes. Assuming you're using a text interface (or not coding any interface at all) you'll never make use of anything beyond standard java.

Also, if you need some reference to look at, the online notes from my last Java class are up at http://www.cs.wisc.edu/~cs367-1/topics.html . Check out the linked lists sections, as I think they're your best bet. I recommend using a non-circular but doubly-linked list, as the easiest to work with. Doubly linked makes removing objects much easier (if you never have to remove, and want to save 4 bytes per record you can make it singularly linked), circular reduces some checks, but introduces others. Generally, if you screw up the checking on a non-circular LL you'll get a null pointer exception; if you screw up in a circular you'll infinitely loop, or have some more hard-to-find errors like accidently doing 2 operations on one record, or skipping one. Being as the non-circular code is cleaner and easier to write, I never use circular unless the assignment specifically mandates it.
__________________
Paul M. Victorey
------------------
I am not responsible for any problems that may arise as a result of following my advice. This includes, but is not limited to, computer failure, loss of data, nuclear war, famine, boils, no clean laundry, your daughter running off with a biker gang, or armageddon. Take my advice at your own risk.
Paul Victorey is offline   Reply With Quote