A quick question because I can't seem to find the answer anywhere I look.
I can understand the example of instantiating a List object using generic type but my current homework assignment involves creating an Appender for Log4j that stores the logs in a list. One of the requirements was that the user could specify a list for the constructor and I have done this by just accepting a list that they have created.
Is there a way to make it so that they can provide the class implementing List that they want to be using and my constructor will instantiate a new instance of it?
 
Aucun commentaire:
Enregistrer un commentaire