title: How to start an intent that extends fragment, from a class that extends Activity?
body: <p>I have problem starting an <code>intent</code> that extends <code>Fragment</code>, from a class that extends <code>Activity</code>. </p>
  
  <p><strong>TabBar2.class --> extends Activity</strong></p>
  
  <p><strong>Favourite.class --> extends Fragment</strong></p>
  
  <p>This is how I write my intent.</p>
  
  <pre><code>Intent intent1 = new Intent(TabBar2.this, Favourite.class);
  startActivity(intent1);
  </code></pre>
  
  <p>But my app crashes when I run the intent when <code>onClick</code>.
  My logCat says </p>
  
  <pre><code>Unable to instantiate activity
   ComponentInfo{com.honey.test/com.honey.test.Favourite}:
   java.lang.ClassCastException: com.honey.test.Favourite
  </code></pre>
  
  <p>What did I do wrong? Can someone guide me on how to solve this?</p>