What is Map and HashMap in Java
Вставка
- Опубліковано 16 вер 2024
- This video will explain What is Map and HashMap in Java.
Map is an interface which accepts Key and Value pair.
HashMap is a class which implements Map Interface.
Related video link below
ChromeOptions in Selenium WebDriver
• What is ChromeOptions ...
ArrayList in Java
• What is ArrayList in J...
Set in Java
• What is Set Interface ...
Interface in Java
• Interface in Java- Imp...
Java Playlist
• Java tutorials for Sel...
All Playlist
/ mukeshotwani
Supported By TestRigor
Sign up today - testrigor.com/...
If you want to support this channel
rzp.io/l/qNCAp...
All Playlist
/ mukeshotwani
Connect with us:
Email - mukeshotwani@learn-automation.com
Linkedin- / mukesh-otwani-93631b99
Instagram- / mukeshotwaniofficial
Facebook Group- / 256655817858291
Facebook Page- / seleniumwebdrivermukesh
Blog- learn-automatio...
Thank you Mukesh sir for explaining everything we needed to become a test engineer.
Thanks Jesna, I am glad it helped you.
Awesome Video Sir✨
It was very easy to understand the map concept. Every other tutorial in UA-cam I found it very complex to understand.
You explained the concept in. Very simple way and to the point.
Thanks🙏🏻
Hi, Sam, I am happy to read your comment :) This always helps me to continue my work. Please keep learning.
Nice Explanation!! Thank you!!
Thanks Gupta ji
Very informative video.
Thanks a lot!!! very helpful 🙂
Thank you Simna I m Glad it helped u 😊
Hi mukesh otwani, thank you for such a wonderful session. Can you please tell the usage of hashmap in Selenium just like set and array list?
Hi Varun, here is one of the example where we are using MAP.
ChromeDriver driver=new ChromeDriver();
Map deviceMatrix=new HashMap();
deviceMatrix.put("width", 768);
deviceMatrix.put("height", 1024 );
deviceMatrix.put("deviceScaleFactor", 100);
deviceMatrix.put("mobile", true);
driver.executeCdpCommand("Emulation.setDeviceMetricsOverride", deviceMatrix);
Hii.. Mukesh..Nice explanation!!... please make a video on browser notification..like how to handle allow and block.. notification..
Thanks a prior!
Hi Rupak, This is the article link learn-automation.com/disable-chrome-notifications-selenium-webdriver/
Thanks.. Mukesh..
Hi Mukesh
We are not creating the objects for the interface but in this sessions List, set and MAP all are interfaces, so how to create an object?
Example :HashMapob1=new Hashmap()-Hashmap
As per my understanding from his teaching, Hashmap is not an interface,it's a class which implements map interface.we can create objects in classes.hope this clears your doubt.
Hi Mukes.., as you said , can you add one more example explaining hashmap in Selenium..
Hi Santoo coming soon
Guess the explanation should be more meaningful when you include collections practical usage with selenium .. with findelements like stuff..Still good attempt..
Hi Ravi Rai thanks for your comment. I will surely add more examples of Selenium but this video (based on the title) only talks about Map and Hashmap and usage that all. How to use and when to use I will be covering in the next videos.
Mukesh otwani great thanks..
Hi mukesh, can you pls make video of enum concept and how to use in hash map
this is the link which you missed to put on the description..docs.oracle.com/javase/7/docs/api/java/util/HashMap.html
Is there any video or series focused on collections(Array, linked list and Hashmap)..
Hi Romita,
I have 3 videos on collection so far
List ua-cam.com/video/OFjYA0apYGY/v-deo.html
Set ua-cam.com/video/cKD5dtZ9m9U/v-deo.html
Map ua-cam.com/video/rOADM99d_fY/v-deo.html
Mukesh otwani - can you create a playlist of this
I took all the href links by using "FindElements" method and all the links contains product name and product price. I want to create a HashMap where i can enter productName as key and productPrice as value. Please help..
Hi Vaibhav, really appreciate your effort. Try below approach
1- Store prouductname and product price in 2 list
2- Create hashmap of key as String and value as Integer
2- Run for loop which will take values from list and store them one by one in hashmap.
Hi Mukesh, nice video.
Have a small Query.
What i understood is Map does not allow the duplicates when Key and values are same.
but how it responds when Key is same but value is different, like
obj1.put("600", "Mukesh");
obj1.put("600", "Ravi");
When tried that scenario while practising i observed that showing the new given value, on what basis it retrieves it?
Ravikumar M it would override
Sir what is happening at the time of loop can you explain
Hi Halitha, I will do one more video on this.
I want to take the table elements using hashmap.. .. As orangehrm admin page having username and name.. .. Using loop.. . I want to get the username for given name.. .. Can you please make one session for that
Sure Nageena will make video for same.
I want this using selenium with testNG and hashmap... I forgot to mention that