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.
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337