How to test if a variable obj
is instance of a list regardless of the type that list is holding
I have tried
obj instanceof List
obj instanceof List<>
But I'm getting a compile error
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.
Sign up to join this communityHow to test if a variable obj
is instance of a list regardless of the type that list is holding
I have tried
obj instanceof List
obj instanceof List<>
But I'm getting a compile error
Solved that
To test if a variable is a list regardless of the type of its elements
obj instanceof List<Object>