I am stuck with an issue . I am calling a method A() . Which sometimes return String and sometimes it returns Array of Strings (String[] strArr) . How can I handle that scenario programmatically ? I don’t have any control in the return type of the method A() .
I have to call that method and store the returned value in a variable. The type of the variable needs to be fixed depending upon the returned value (String / Array of Strings) from the method .
Thanks in advance .
try this