title: What is the runtime class of Arrays.asList()
body: <p>I need to know the runtime class of <code>Arrays.asList()</code>.</p>
  
  <p>So when i do this:</p>
  
  <pre><code>List&lt;String&gt; list = Arrays.asList("one", "two");
  logger.info(list.getClass()); // ==&gt; class java.util.Arrays$ArrayList
  </code></pre>
  
  <p>The log shows: <strong>class java.util.Arrays$ArrayList</strong> . </p>
  
  <p>Some search for,  <strong>java.util.Arrays$ArrayList</strong>: </p>
  
  <blockquote>
    <p>is a nested class inside the <strong>Arrays</strong> class that implements the <strong>List</strong> interface. This implementation has a fixed length and is backed by an array. </p>
  </blockquote>
  
  <p>But i do not find the runtime class of it, to do this alt when for exemple: <strong>List args = Arrays.asList("one", "two")</strong></p>
  
  <pre><code>public Object register(Object args) {
  
         if(args.getClass().equals(java.util.Arrays.class)) {
              //do something
              // don't work
              return "";
         }
         if(args.getClass().equals(ArrayList.class)) {
              //do something
              // don't work
              return "";
         }
         //other Alt statement code
         return "";
  }
  </code></pre>
  
  <p>I have no idea how to do the comparaison.</p>