Can an inner class have static members?

The reason why inner classes cannot have static members is because static members are usually instantiated when the program starts. However, an inner class depends on having an instance of its enclosing class in order to create it and then access it’s members.

Sizin İçin Seçtik  25 Ocak 2022 dolar kuru ne olur?

Leave a Reply

Your email address will not be published. Required fields are marked *