> I have created a program to build a dictionary file. This program uses a
> simple socket connection to a news server and stores each word in a
[quoted text clipped - 7 lines]
>
> Regards j1mb0jay
> j1mb0jay schrieb:
>> I have created a program to build a dictionary file. This program uses
[quoted text clipped - 15 lines]
> - try using lower case letters for method names (have a look at Java
> coding conventions)
I will take this into consideration (have been used to writting C#
before this point).
> - Don't implement your own HashTable use Java's HashMap
> - Don't implement your own LinkedList .. use some list implementation
> Java already has
I have to implement my own version of these data structures as this is
coursework and i require an understanding of how these work and i feel
this is a good way of doing this.
> - There is really no need for you to store the hashcode of a string..
> (Word.java)
I understand where you are coming from, and will remove this propriety
from the word class. I just thought it would be faster if i stored it
rather than calculating it each time (but this thought is wrong as i
would just look at the index into the array - as this is the hashCode)
> - I would recommend against reusing the name of java api classes.
> Especially don't reuse popular names like "Socket" or if you even use
> Socket in your own Socket class.
>
> - code looks cleaner if you use import statements consequently
I will start working on renaming the class names.
> About your IO
> Its better to throw exceptions to a level that can handle it
[quoted text clipped - 4 lines]
> Also don't simply catch Exception .. be a bit more specific .. just
> catch IOException ..
Throwing exceptions is something i will start working on the final
version of the application. At the moment I just wanted to test to make
sure it worked.
> I recommend you to practice coding. May be start reading some example
> code on Java's learning trails. Try to adapt the coding style you can
> see there.
I have read an understand some of the Java coding practices. Like i said
i am used to writing C#.
> Christian
Thanks for your time. Hope the code didn't make you cringe to much
...!!! Have not been writing Java for to long.
Regards James