title: How to know if a java object is a List
body: <p>I would like to know how to ask if a java object is a List or an ArrayList.</p>
  
  <p>For example:</p>
  
  <pre><code>if (Object instanceof List &lt;?&gt;)) {
      // Do something
  }
  </code></pre>
  
  <p>PS: I have several lists of different types and would like to implement the method for any list no matter what type of data they contain.</p>