title: Checking String and an Array of Strings in Java
body: <p>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() .</p>
  
  <p>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 .</p>
  
  <p>Thanks in advance .</p>