While reading the "Hello, Android" book, I noticed that:
each java file with
onCreate(Bundle savedInstanceState)
method, has protected access modifier EXCEPT in the main Activity of the program [that has:public void onCreate(Bundle savedInstanceState)
].
Why is the onCreate
method public
on the program's main Activity, but protected
everywhere else?