title: Pass class created by class.forName as an argument
body: <p>I have class "Q1" that extends Fragment. I create it using class.forName and then I need to pass it as an argument to method that receives (int,Fragment), but there is Wrong second type error. i cannot just cast object to "Q1", because 
  I'm going to create more classes like "Q2,Q3" and etc. So is it possible to pass unknown class to this method</p>
  
  <pre><code>Object clazz = Class.forName(fClass).newInstance(); //fClass is the class name
  fTrans.replace(FragmentPlace, clazz);// Wrong second type
  </code></pre>
  
  <p>P.S This would work perfectly if I use object created not by class.forName.
  Like this</p>
  
  <pre><code>Q1 clazz = new Q1();
   fTrans.replace(FragmentPlace, clazz);
  </code></pre>