Skip to content
Advertisement

Why in Android documentation Activity classes have static modifier

If we open android documentation we will see that Activity classes have static modifier:

JavaScript

I’m used to declaring Activities without static modifier:

JavaScript

What is the reason behind using static modifier in Activity class declaration?

UPDATE:

The static modifiers have been removed from the documentation.

Advertisement

Answer

It’s Documentation bug. Sadly, they are not rare. You’d normally only use the static modifier for classes when declaring an inner class that does not need to be linked to the declaring outer class, for example:

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement