Why Do We Extend Application Class In Android : <p>Why do we extend application class. Android apps run properly even without extending it.</p>

<p>Can anyone explain this scenario as why exactly do we extend it.</p>

<p>For Example:</p>

<pre><code>public class MyApp extends Application {

    private static MyApp app;
    private ImageDownloaderComponent imageDownloaderComponent;

    @Override
    public void onCreate() {
        super.onCreate();
        app = this;
        imageDownloaderComponent = DaggerImageDownloaderComponent.builder().imageDownloaderModule(new ImageDownloaderModule(this)).build();
    }

}
</code></pre>
