In the spec we have various methods that take an int recNo as argument. Problem is that the database does not contain a record number field so does the recNo refer to the sequentially placed record in the database?
In other words does recNo = 5 refer to the fifth record? Further, could this not be interpretted as being the 6th record if we count from 0?
You could do it either way I guess once you justify it. I suppose the most user friendly way would be to start record counting from one, although it makes things a slightly more complex (messy even?) in the data class [ November 21, 2006: Message edited by: Mark Smyth ]
The end user doesn't have to know anything about the record number. For the Java developer it makes more sense starting them from 0 because everything else in Java does (trust me, I worked for 3 years in a company where we had to mix Java with a custom language that used 1 based arrays, it was a constant headache to remember which method calls used 1 based indices and which used 0 based indices).
Even though we are used to arrays starting at zero I think that the Data class should be seen as some kind of a database interface and if you check java.sql.ResultSet this interface states that the counting start at 1.
SCJP 1.5<br />SCJD URLyBird (in progress)
Jeroen T Wenting
Joined: Apr 21, 2006
Yes, which goes counter to everything else in Java See it better as a call to a mainframe where you're in control of both the mainframe and the client.