Category Archives: Java

HashSet in Java

HashSet: Implements Set Interface. Underlying data structure for HashSet is hashtable. As it implements the Set Interface, duplicate values are not allowed. Objects that you… Read More »

Assertions in Java

An assertion allows testing the correctness of any assumptions that have been made in the program. Assertion is achieved using the assert statement in Java.… Read More »

Generics in Java

Generics in Java is similar to templates in C++. The idea is to allow type (Integer, String, … etc and user defined types) to be… Read More »

Garbage Collection in Java

In C/C++, it is programmer’s responsibility to delete a dynamically allocated object if it is no longer in use. In Java, the programmer need not… Read More »