Skip to content

Commit 194449c

Browse files
Update README.md
1 parent d7eaabe commit 194449c

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,32 @@ This is all about Java Collection.
2626
Collection: It is the top of the collection hierarchy. It supports basic grouping of elements.
2727

2828
```
29+
<h3>The Collection interface is the foundation upon which the Collections Framework is built because it must be implemented by any class that defines a collection.Collection is a generic interface that has this declaration:</h3>
30+
31+
<h3 align="center">
32+
33+
```Syntax
34+
35+
interface Collection<E>
36+
37+
```
38+
39+
</h3>
40+
41+
<h3> Here E specifies the type of objects that the Collection will hold. Consider an example: </h3>
42+
43+
<h3 align="center">
44+
45+
```Syntax
46+
47+
Collection<String> co
48+
49+
```
50+
51+
</h3>
52+
53+
<h3>The above example can be a List, a Set, or another kind of Collection.</h3>
54+
2955
<ul>
3056
<ul>
3157
<h3><a href= "https://github.com/AvinandanBose/JavaCollectionFramework/blob/main/javacollection1.java" > Java Collection [Eg -1]</a></h3>
@@ -997,3 +1023,4 @@ sequenceDiagram
9971023
</tr>
9981024
</table>
9991025
</ul>
1026+
<h3> <i><ins>Note: </ins></i> Collection , Set, SortedSet, Navigable Set are all interfaces and we cannot create their objects due their abstract nature. </h3>

0 commit comments

Comments
 (0)