Is this possible without going through the list and casting the objects?
I also need to convert List<Object> to List<T> (T = predefined Object) if it’s possible?
Edit: for clarification, I’m trying to use List<Object> as a return type of a class method that is widely used in my code.
No. This is simply not a valid conversion, because not all
Objects areString[].You could have determined this for yourself in 2 lines of code.
Edit
It sounds like you need to write the method more generically. Something like this:
This can return a
List<String[]>like so: