0% found this document useful (0 votes)
11 views1 page

Day31 - Notes

Java day 31 notes

Uploaded by

abhimanyu thakur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views1 page

Day31 - Notes

Java day 31 notes

Uploaded by

abhimanyu thakur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

2/10/2019 Evernote Export

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

Calling the methods using String text (Reflection API)

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

You might also like