Binary Search Example

Binary search example in java

 

TreeSet Vs HashSet

Treeset and hashset both belong to set and obey the rule of maintaining uinique elements . But treeset comes with some more added advantage. TreeSet gives ability to sort elements with the help of the compareTo(). More examples on http://www.shivapreals.tech/allpost/java-tutorial/java-collection-tutorial/ HashSet allows null elements. Treeset never allows null.   Hashset is faster as it is not dealing with sorting Read More

Anonymous classes in java

Type2:

 

Test Multiple Read By threads in java