How can Android source code not have a main method and still run?
<p>I've seen this in a few tutorials now... but how in the world can Android source code not have a main method and still run.</p>

<p>For example (from <a href="http://developer.android.com/guide/tutorials/hello-world.html" rel="nofollow">http://developer.android.com/guide/tutorials/hello-world.html</a>):</p>

<pre><code>public class HelloAndroid extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }
}
</code></pre>

<p>That runs but there is no main!!!</p>

<p>I've also thought that using things like onCreate (or formLoad, etc.) was bad becuase a constructor should do that work and such built-in methods can be smelly sometimes.  But onCreate is an entry point?   Even without a main?</p>

<p>What if there is more than one activity... is there a hierarchy to these built in event handlers?  OnCreate trumps everything else?  Otherwise, how would the app know what to run or where to enter the program?</p>

<p>Thanks!</p>
