Jul-01-2022, 06:34 AM
(This post was last modified: Jul-01-2022, 07:56 AM by Gribouillis.)
Unlike inner class, a static nested class cannot access the member variables of the outer class. It is because the static nested class doesn't require you to create an instance of the outer class. OuterClass. NestedClass obj new OuterClass.We can not have a « url snipped » static method in a nested inner class because an inner class is implicitly associated with an object of its outer class so it cannot define any static method for itself. For example, the following program doesn't compile.
Gribouillis write Jul-01-2022, 07:56 AM:
Offsite link promotion snipped. Pleas read What to NOT include in a post.
Offsite link promotion snipped. Pleas read What to NOT include in a post.