We can reverse a String via characters as well as with words. There are multiple ways to achieve it. Below are the methods to do do the same: converting a string into an array to reverse by characters Splitting String with blank spaces to reverse by words Using the reverse() method from the StringBuffer classRead More
Array
Using HashMap in Java. (Collection-4)
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
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 – 8 || Lets learn about Arrays in Java.
In general, “array” means an arrangement of similar things in a particular way. On the other hand, we can say the arrays in Java is grouping the things having same features. In Java programming, the array is used to store multiple values in aRead More