View Single Post
  #6  
Old July 24th, 2009, 08:11 AM

LDiCesare LDiCesare is offline
Captain
 
Join Date: Apr 2004
Location: France
Posts: 820
Thanks: 4
Thanked 33 Times in 24 Posts
LDiCesare is on a distinguished road
Default Re: O.T Help sought from Java Programmers

Of course using a string for gender is not great. A boolean would do the job, or a class with two fixed instances and a private constructor rather than an enum. But then IRL you would store that info in a database anyway.
Hand-writing an array with proper memory management is just a pain and probably beyond the OP's skills right now, so he's better off using a List to begin with in my opinion. It's also a rather useless exercise in java. It's great in C, but in java it's just silly as you could copy-paste the Vecotr code if you wanted to anyway.
Reply With Quote