Skip to content

Commit ba34230

Browse files
Update README.md
1 parent 5fad8a9 commit ba34230

File tree

1 file changed

+65
-1
lines changed

1 file changed

+65
-1
lines changed

README.md

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5810,12 +5810,76 @@ Eg <type> e = Eg<type>{
58105810

58115811
<h2><li>4. Generic Inner Class </li></h2>
58125812

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();
5840+
5841+
}
5842+
5843+
```
5844+
5845+
</h3>
5846+
5847+
<h3><li><a href="https://github.com/AvinandanBose/JavaGeneric/blob/main/InnnerClass1.java"> 1. Generic Inner Class- Eg(1)</li></h3>
5848+
5849+
<h3><li> Using Upper Bound </li></h3>
5850+
<ul>
5851+
<h3><li><a href="https://github.com/AvinandanBose/JavaGeneric/blob/main/InnnerClass2.java"> 2. Generic Inner Class- Eg(2)</li></h3>
5852+
58135853
</ul>
58145854

5815-
<h1 align="Center"> ------x-------</h1>
58165855

5856+
<h3><li> Using Upper Bound </li></h3>
5857+
<ul>
5858+
<h3><li><a href="https://github.com/AvinandanBose/JavaGeneric/blob/main/InnnerClass2.java"> 2. Generic Inner Class- Eg(2)</li></h3>
5859+
</ul>
5860+
5861+
<h3><li> Using Multiple Upper Bound </li></h3>
5862+
<ul>
5863+
<h3><li><a href="https://github.com/AvinandanBose/JavaGeneric/blob/main/InnnerClass3.java"> 3. Generic Inner Class- Eg(3)</li></h3>
5864+
</ul>
5865+
5866+
<h3><li> Using Lower Bound </li></h3>
5867+
<ul>
5868+
<h3><li><a href="https://github.com/AvinandanBose/JavaGeneric/blob/main/InnnerClass3a.java"> 4. Generic Inner Class- Eg(4)</li></h3>
58175869
</ul>
58185870

5871+
5872+
</ul>
5873+
5874+
</ul>
5875+
5876+
</ul>
5877+
5878+
5879+
</ul>
5880+
5881+
<h1 align="Center"> ------x-------</h1>
5882+
58195883
<br>
58205884
<br>
58215885

0 commit comments

Comments
 (0)