Static Inner Classes Homework Help

What are Static inner classes in Java?

If we define an inner class as static then it is known as a static inner class.

Properties of static inner classes

a) We can define any access specifier before a static inner class.

b) Static inner classes can have static members as well as nonstatic members.

c) Static members of a class are directly available to the static and non-static members of that class but non-static members of a class are not directly available to the static members of that class.

d) In a static inner class, even if we define a non-static function, it is still static because it is in a static class. I.e. it is in the static domain.

e) From the static inner class, we cannot access any non-static members of the outer class directly. In order to do so, we need to create an object of outer class explicitly.

Online Tutors USA United States Get To Know Us Get in Touch   Tutoring Services   Top Subjects Test Prep
7740 McCallum Blvd, Dallas, TX About Us Contact Us   K-12 Tutoring   English Tutor GMAT Tutors
info@tutorspoint.com How It Works FAQ   Homework Help   Math Tutor LSAT Tutors
STUDENT SUPPORT Terms of Use Become a Tutor   Test Prep   Science Tutor SAT Tutors
support@tutorspoint.com Privacy Policy Students Blog   Assignment Help   Computer Tutor MCAT Tutors