Is local class function in Java?

Local classes are similar to inner classes because they cannot define or declare any static members . Local classes in static methods, such as the class PhoneNumber , which is defined in the static method validatePhoneNumber , can only refer to static members of the enclosing class.

Sizin İçin Seçtik  What is the use of anonymous inner class?

Leave a Reply

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