Because you, as a developer, are responsible for y...
# android
r
Because you, as a developer, are responsible for your code. If you'd invoke
Activity#findViewById()
before
Activity#setContentView()
, you'd receive
NPE
as well. Here no compiler nor language can help.