title: How to check whether an Object is String or String Array in java?
body: <p>A method is returning a <code>Object</code> or <code>Object[]</code> of type <code>String</code> but if I am casting with <code>String[]</code>, it is giving class cast exception when it contains single string. How can i resolve this?</p>
  
  <p>Is there any way to check whether it contains <code>String</code> or <code>String[]</code>?</p>