Day31 - Notes
Day31 - Notes
HashSet
Unlike ArrayList, HashSet wont have index values and hence we cannot use for loop with HashSet
Unlike ArrayList, HashSet stores the values in a random order
Demonstrate HashSet which stores integer type of values and uses for each loop to print those values -
Demonstrate here
Assigning the object of HashSet class to Collection / Set Interface - Demonstrate
Iterator interface and iterator() method
iterator() is a predefined method of Collection interface, who's return type is Iterator interface
hasNext() and Next() are the predefined methods of the Iterator interface
Demonstrate using Iterator and iterator() with ArrayList - Demonstrate here
Demonstrate using Iterator and iterator() with HashSet - Demonstrate here
HashMap
Instead of storing the objects as a group of Objects, HashMap stores the objects in the form of key value
pairs.
Demonstrate a HashMap which stores different key value pairs and uses get() method to retrieve a value
based on the provided key - Demonstrate here
Demonstrate a HashMap which stores different key value pairs and uses for each loop to print those
values - Demonstrate here
In Selenium Automation, we need to read the values from the Excel file and call the appropriate methods having the
same names as the values.
Demonstrate a program which calls a method having the same name as String text - Demonstrate here
Demonstrate a program which calls a parameterized method having the same name as String text -
Demonstrate here
Purpose - In Selenium Automation, we need to read the values from the Excel file as Strings and call the
appropriate methods having the same names as the String text.
file:///C:/Users/arunm/Desktop/Selenium%20Training%20-%20Session%2031.html 1/1