title: Understanding method in Activity
body: <pre><code>public class MainActivity extends AppCompatActivity {
   @Override
    protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
   }
  }
  </code></pre>
  
  <p>This is a beginner question but i cant seem to understand it ,also I searched and couldn't find the same question.</p>
  
  <p>Here is what i understand:</p>
  
  <p>Class <code>MainActivity</code> is extending <code>AppCompatActivity</code> thus it can use the fields and methods of the parent class.</p>
  
  <p>The <code>protected void onCreate(Bundle savedInstanceState) {</code> is a method inside the parent class and its getting overridden.Then the <code>super</code> keyword is used to call the <code>onCreate(..)</code> method.</p>
  
  <p>Now What i dont understand is the <code>setContentView(..)</code> method. I thought that in java we should use an <code>obj.method</code> or <code>super.method</code> or <code>ClassName.method</code>(if static) to call a method. But here the method is used alone. I just need a small explanation or a redirection to the right place.</p>
  
  <p>Thank you.</p>