Question: I need help reading generic types from any input in java. I would want to read all elements from any generic type and put them
I need help reading generic types from any input in java.
I would want to read all elements from any generic type and put them into an generic array in java.
Like for example if a user inputs a text file as an input on one instance of this class and a list of integers as an other input for another instance of the class.
I prefer not to use maps in java if possible.
Please explain in detail each step.
Thank you
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
