Java will initialise all elements of an array to null when you create the array itself.
Your Details (ALWAYS, ALWAYS, ALWAYS capitalise classnames) class should have a public setName(String name) method.
You should indeed also initialise the array elements yourself.
Reputation Points: 1658
Solved Threads: 331
duckman
Offline 7,719 posts
since Nov 2004