/    Sign up×
Community /Pin to ProfileBookmark

When we really need to use nested class ?

Sun’s java tutorial says,

A static nested class is called just that: a static nested class. A nonstatic nested class is called an inner class.Additionally, there are two special kinds of inner classes: local classes and anonymous classes (also called anonymous inner classes).
————————————

and, OO programing says, software objects are modeled after real-world objects in that they too have state and behavior. An object is a software bundle of variables and related methods.

this two strange circle to lose mine senses. Like a gestation women.
Do you think this correct, and we really need a nested class ?

Perhaps this is my foolish conception. ?

to post a comment
Java

3 Comments(s)

Copy linkTweet thisAlerts:
@felgallApr 26.2006 — Nested classes are for when something doesn't make any sense to be accessed from outside of the class that it is nested in. It is part of the encapsulation aspect of OO.
Copy linkTweet thisAlerts:
@slevenauthorApr 26.2006 — thanks felgall ,

I'm always think OO encapsulate Methods and Variables before to know Nested classes. Class can encapsulate class , this really ?
Copy linkTweet thisAlerts:
@slevenauthorApr 30.2006 — Someone says, Java only 10% unlike OO, is this accuratly ?
×

Success!

Help @sleven spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...