Say I have a list of plants and a bunch of plant<Plantname> classes.
I want to be able to use a plant from the array to create an object for referencing a plant<Plantname> class.
My first class.
public class plantList{ public static void main(String[] args){ String[] plantList ={"Tree","Bush","NotherPlant","NotherNotherPlant"}; } }
My other classes go along these lines:
public class plantTree{ String Color=Brown,OtherStuff=DescriptionOfOtherStuff; }
I wish it was as simple as putting:
plant(plantList[/*number*/]) goplant = new plant(plantList[/*number*/])
This is obviously not the actual stuff I would put in here, but just an example.
How would I go about doing this?