Dear Paul did you try to solve the LAB-1023 homework? you will see that Mr. Sang didn't require adding a name field ( car name ) while we instantiate the different subclass of Car class with reference names which are related to the cars which we are setting and viewing the salePrice of. of course if we use an array of Car Objects it won't be useful to use the references because then it will be some thing like "pa[i]" which doesn't make a sense of a car. if you go back to my first message in this discussion you will find out what i mean exactly. thank you.
2009/8/25 Тайновед <[email protected]> > Dear, Abbas Zaini, If this will be possible, please, describe us the way > of using this string (which contains the name of reference) in *creating a > new 'name field*'? > > Paul > > 2009/8/25 Abbas Zaini <[email protected]> > >> so there is no way to get the name of the reference of an object's >> instance, but as long as the parameter is passed to the method by reference, >> it means that the compiler recognizes it, and it is possible to get the >> string which references the instance, maybe such a method gets available in >> future versions of JDK, because it is really useful to have it, it saves you >> the effort of creating a new name field and initiate it in each object >> instance,and in the project which i am working on it saves me a whole line >> after each object instance. >> >> -- >> Abbas Zaini >> >> >> >> -- > Живой, я живые тела крушу; стальной - ты крушишь металл, > И, значит, против своей родни, каждый их нас восстал. > -- Abbas Zaini --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaprogrammingwithpassion?hl=en -~----------~----~----~----~------~----~------~--~---
