title: casting LinkedList<Object> to LinkedList<Customer>
body: <p>I have a method like this</p>
  
  <pre><code>public static LinkedList&lt;Object&gt; getListObjectWithConditionInXMLFile(String className){
         LinkedList&lt;Object&gt; lstObj = new LinkedList&lt;Object&gt;();
         if(className.equals("Customer")){
              //read Data from XML File
              Customer customer = ...;
              lstObj.add(customer);
         }
         ....
         return lstObj;
  }
  </code></pre>
  
  <p>after that i call this method and want to cast :</p>
  
  <pre><code>LinkedList&lt;Customer&gt; lstCustomer = (LinkedList&lt;Customer&gt;()) getListObjectWithConditionInXMLFile("Customer");
  </code></pre>
  
  <p>But it cannot cast. 
  How can i cast from LinkedList to LinkedList ? 
  Pls help me ! thanks so much !</p>