getWindowHandle() stores the reference of the currently active window. On the other hand, getWindowHandles() returns a list of all the opened windows associated with a particular driver instance. getWindowHandle() It basically returns an id(handle) pointing to the currently active window. The return type of this method is a String type. We can use this referenceRead More
ArrayList
Program for List and ArrayList in Java.
Basic difference between List and ArrayList is that List is an Interface and ArrayList is a Collection class. ArrayList implements List Interface. Declaration and Initialization of List and ArrayList Traversing values in the List Using List with Integer values We can use all the methods as it is for integer values as well. Other UsefulRead More
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
Collection Types and features in Java. (Collection-1)
The Collection is a root Interface which contains other Interfaces like List, Queue, Map and Set. These Interfaces further contains Classes or sub-interfaces. Facts about Collection All these Classes and Interfaces make a framework structure to create a list of objects(like String, Integer, etc). It also provides common methods/features to handle and manipulate these underRead More