You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+65-1Lines changed: 65 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5810,12 +5810,76 @@ Eg <type> e = Eg<type>{
5810
5810
5811
5811
<h2><li>4. Generic Inner Class </li></h2>
5812
5812
5813
+
<ul>
5814
+
<h3><i>Diamond operator was introduced in Java 7 .The main purpose of the diamond operator is to simplify the use of generics when creating an object. The diamond operator could not be used with Anonymous inner classes in JDK 7. In JDK 9, it can be used with the anonymous class as well to simplify code and improves readability. </i></h3>
5815
+
5816
+
<h3>According to the Java's Inner Class we know : </h3>
5817
+
5818
+
<h3><li> 1) Nested Class </li></h3>
5819
+
5820
+
<ul>
5821
+
5822
+
<h3>
5823
+
5824
+
```Syntax
5825
+
5826
+
OuterClass{
5827
+
InnerNestedClass{
5828
+
5829
+
}
5830
+
5831
+
}
5832
+
5833
+
main(){
5834
+
5835
+
//Creation of Outer Class Object
5836
+
OuterClass outerObj = new OuterClass();
5837
+
5838
+
//Creation of Inner Class Object
5839
+
OuterClass.InnerNestedClass innerobj = outerObj. new InnerNestedClass();
0 commit comments