A Java program execution starts from main() method. Right? Since Android apps run on Java, Then why we didn't create a main() method in Android studio?
Asked
Active
Viewed 1,216 times
1 Answers
1
There's one, but you don't need to see it. Android takes care of threading and keeping threads organized for you, see here.
Moreover, the entry point for an activity is the onCreate()
method, so all initialization is normally done in there. The first activity run by your app is normally specified in the manifest file under the launcher keyword.
See here to know more about how android runs the launcher activity.

Levi Moreira
- 11,917
- 4
- 32
- 46
-
Can you explain little more? – Jithin Jude Mar 04 '18 at 11:47
-
The article I referenced has a nice image showing the steps from calling the main() function in the ActivityThread class to calling the onCreate() function from an activity. It's pretty neat :) – Levi Moreira Mar 04 '18 at 11:55