Re: A java program (MyHashTable)



Roedy Green wrote:
On Tue, 22 Apr 2008 09:02:26 -0700 (PDT), Andrew Marcus
<mainhoonanjaane@xxxxxxxxx> wrote, quoted or indirectly quoted someone
who said :

public String ConverttoString() {
StringBuffer s = new StringBuffer();


ConverttoString should read convertToString.

See http://mindprod.com/jgloss/codingconventions.html

While they're at it, class "data" should be class "Data",

static data PRESENT = new data();
should be either
static Data present = new Data();
or just possibly
final static Data PRESENT = new Data();

and

Object NON_EXISTENT_KEY;
should be
Object nonExistentKey;

Presumably initializing it to null is intentional.

All those one- and two-letter variable names should be longer and more self-explanatory, and begin with lower-case letters.

Also, see
<http://java.sun.com/docs/books/tutorial/java/javaOO/variables.html>
for advice about access modifiers.

--
Lew
.