Skip to content

Commit 94a6374

Browse files
Update README.md
1 parent 8e352de commit 94a6374

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -846,6 +846,27 @@ Greatest Element to Lowest Element.
846846
<h2> </h2>
847847
</ul>
848848
<h1 align="center"> Comparator Interface on Tree Set </h1>
849+
<ul>
850+
<h3> Comparator helps to find the sorting order used in the TreeSet objects ; for example, with the implementation of the Comparator interface.The methods provided by the interface are: </h3>
851+
852+
<table>
853+
<tr>
854+
<td colspan="2">Methods of the Comparator interface</td>
855+
</tr>
856+
<tr>
857+
<td >Method</td>
858+
<td >Does This</td>
859+
</tr>
860+
<tr>
861+
<td >int compare(Object obj1,Object obj2) </td>
862+
<td >It compares its two arguments.</td>
863+
</tr>
864+
<tr>
865+
<td >boolean equals(Object obj) </td>
866+
<td >It specifies whether another object is equal to this comparator.</td>
867+
</tr>
868+
</table>
869+
</ul>
849870
</ul>
850871
851872

0 commit comments

Comments
 (0)