HashMap is a class that implements the Map interface. A map stores data in the Key-Value pair. HashMap uses the same technique to store values. Class: HashMap Interface: Map Package: java.util We can never lose any data as we are tagging each element with a key in HashMap. On the other hand, while using anRead More
next()
LinkedList Class implementation and usage. (Collection-3)
In LinkedList objects are stored as a node in a List. Each node is divided in three parts: Address of Previous node, Data of the node, Address of Next node. Review features of ArrayList It is a resizable array which increases the array size whenever we add new items in the list. The default sizeRead More
Use of ArrayList Class in Java. (Collection-2)
ArrayList Class implements List Interface. In the last chapter, we have read about all the classes and their features as well as limitations. Now, we will understand all these concepts at the code level. Class: ArrayList Interface: List Package: java.util Key points of ArrayList Stores objects as a list of elements and Any number of elements canRead More
Basic Java – 15 || Runtime User Input using Scanner Class (Part-1).
Scanner Class is the commonly used way of taking user inputs. There are many instances where user interaction is needed at runtime during the Program execution. Scanner Class It can be used via java.util.Scanner library files. There is a major role of Whitespace and Enter while taking user inputs using Scanner class. These user inputsRead More