Inner classes: Difference between revisions
m
Fixed typos.
Thundergnat (talk | contribs) m (→{{header|Raku}}: Add a Raku example) |
m (Fixed typos.) |
||
Line 2:
;Definition
In [[wp:Object-oriented_programming|object-oriented programming]], an '''inner''' or '''nested class'''
It is not the same as a '''subclass''' which is a class which inherits members from another class or classes and can be declared anywhere the parent class(es) are within scope. However, inner classes may nevertheless be subclasses of other classes as well.
Line 11:
Illustrate your answer by creating an inner class with a constructor, an instance method and field and show how to instantiate it.
If
;Reference
|