I have the following class as a example to a similar problem im having ...
Class Car Class CreateCarFromList in the last class i have an arraylist,carNames, with the following value
["Red", "Blue", "Yellow"]
than i do an iteration and create an instance of an object in each iteration and add it to another arraylist, carObject
my problem is what do i need to do, to add to the
Car class or perhaps to
CreateCarFromList Class.
so that i can say for a
String s = "Red"; give me from
carObject list the Car object that has that attribute. (hope this make sense)