What is Application?

Application is base class in Android, which contains all components like activites,services...

The Application class is first instanitated while running any application.

We can write Custom Application class by extending the Application class.

 

class MyApplication extends Application{

@Override
    public void onCreate() {
        super.onCreate();

    }

}

We can declare any single instance classes here and use entire application.

To execute this class we need to set Application name in  manifest file.