Skip to content

Commit 674d5c3

Browse files
author
Ram swaroop
committed
added content
1 parent 4e2cfbe commit 674d5c3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

_posts/2015-08-20-nested-classes.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,16 @@ class MyOuter {
273273
* A local class declared in a `static` method has access to only `static` members of the enclosing class, since there is no
274274
associated instance of the enclosing class. If you're in a `static` method, there is no `this`, so an inner class in a
275275
`static` method is subject to the same restrictions as the `static` method. In other words, no access to instance variables.
276+
277+
## Anonymous Inner Classes
278+
279+
Inner class declared without any class name at all is known as __Anonymous Inner Class__. These can be seen as two types:
280+
1. Plain/Normal Anonymous Inner Class
281+
2. Argument defined Anonymous Inner Class
282+
283+
1. Plain/Normal Anonymous Inner Class also comes in two flavors:
284+
285+
i. Flavor 1:
276286

277287
278288

0 commit comments

Comments
 (0)