How to use a HashSet
Description: HashSet class is a concrete implementation of Set interface. It creates a collection that uses a hash table […]
Read More →Description: HashSet class is a concrete implementation of Set interface. It creates a collection that uses a hash table […]
Read More →The associated package for HashMap and TreeMap classes: java.util.HashMap java.util.TreeMap Common constructors of the HashMap and TreeMap classes: Constructors […]
Read More →Description: A LinkedList is a collection that's similar to an array list. However, the LinkedList class doesn't use an […]
Read More →Description: An ArrayList is a collection that's imilar to an array, but can change its capacity as elements are […]
Read More →The syntax for specifying the type of elements in a collection: CollectionClass<Type> collectionName = new CollectionClass<Type>(); Example 1: A […]
Read More →The collection framework: Collection Set HashSet more info here List ArrayList more info here LinkedList more info here Map […]
Read More →How arrays and collections are similar. Both can store multile occurrences of objects. Some collection types (such as ArrayList) […]
Read More →You can only use the sort method of the Arrays class to sort arrays of objects when the classes […]
Read More →There are two ways to define an array: type[] arrayName; type arrayName[]; How to initialize: arrayName = new type[length]; […]
Read More →An enumeration is a set of related constants that define a type. The constants are defined with the int […]
Read More →