You must be logged in to perform this action.
You must be logged in to perform this action.
You must be logged in to perform this action.
You must be logged in to perform this action.

Inner Classes: A Programming Construct

No Strings Attached
Author:
,
Subject:
Science and Technology
Institution Name:
Connexions
Collection:
Connexions
Grade Level:
Post-secondary
Abstract:

In Java, besides having fields and methods, a class can also have other classes as members. Just like fields and methods, a class member of can be static or non-static. A non-static class member is called an inner class. Inner class is a programming construct based on the powerful concept of closure prevalent in the functional programming paradigm. It allows on-the-fly creation of objects, which can communicate transparently with the enclosing object inside of which they come into existence. We illustrate the rationale and use of inner classes via a progression from top level helper classes to named static nested classes, to non-static named classes, and to anonymous inner classes with dynamic on-the-fly instantiation.

Course Type:
Learning Module
Languages:
English
Material Type:
Activities and Labs, Readings
Media Format:
Graphics/Photos, Text/HTML, Downloadable docs
Conditions of Use:
Creative Commons Attribution 2.0
Creative Commons Attribution 2.0

Comments

Send link to this page

The e-mail address to send this link to.
A comment about this link.
Log in or Register

Rate and Review

Evaluate Resource What is this?

Common Core Standards

Align Resource
Not Yet Aligned

    Add new alignment tag:

    Share

    Tags

    Keywords, descriptive words, interested groups & more