Jim Yingt at JavaRanch,
I have a question. I'm reading the
SCJD from Apress.com.
At the page of 143 - 144,
private DVD retrieveDVD(long locationInFile ) throws IOException {
Class RecordFieldReader { } //as a inner class, and
RecordFieldReader readRecord = new RecordFieldReader();
}, which read a DVD and return
What is the benefit of designing like the above?
I am looking at each record, the class has to be redefined and get a instantiated.
So, if I have million records, I have to define the inner class milliontimes and instantiate
this class million times. If the benefit of design like this surpasses my concerns
written above, I would like to know exactly.
Would you be kind enough to explain to me?
It would be really appreciated. Thanks -
---Paul Seldon