[Class]Ridiculous question
- From: Daniel Moyne <dmoyne@xxxxxxxxxx>
- Date: Fri, 28 Dec 2007 20:51:18 +0100
I have a class sosaIndex() that takes one parameter sosaRoot ; in this class
I have a contructor (method sosaIndex) that on instanciation calls a method
setIndexation based on sosaRoot.
When the first time I instancie to create an object called "aa" I have
this :
sosaIndex aa=sosaIndex(sosaRoot);
Now if I change the sosaRoot I can use :
(1) aa.setRoot(sosaRoot) if this method is part of class sosaIndex to change
the sosaRoot of the object "aa" instanciated.
and after this :
aa.setIndexation(sosaRoot)
to finish the job and eventually get my object "aa" up-todate,
but Java does not say anything wrong if I do again :
(2) sosaIndex aa=sosaIndex(sosaRoot);
I mean instancie a new object with the SAME NAME "aa".
Anything wrong with method (2) and what happens to the first
instanciation "aa" ?
Thanks.
.
- Follow-Ups:
- Re: [Class]Ridiculous question
- From: Roedy Green
- Re: [Class]Ridiculous question
- From: Mark Space
- Re: [Class]Ridiculous question
- Prev by Date: Re: Help with packages getting started
- Next by Date: Re: question about the toString Method
- Previous by thread: Help with packages getting started
- Next by thread: Re: [Class]Ridiculous question
- Index(es):