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.
|