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...

КОМЕНТАРІ • 35

  • @jesnathomas9307
    @jesnathomas9307 3 роки тому +1

    Thank you Mukesh sir for explaining everything we needed to become a test engineer.

    • @Mukeshotwani
      @Mukeshotwani  3 роки тому

      Thanks Jesna, I am glad it helped you.

  • @sammenon6588
    @sammenon6588 5 років тому +1

    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🙏🏻

    • @Mukeshotwani
      @Mukeshotwani  5 років тому

      Hi, Sam, I am happy to read your comment :) This always helps me to continue my work. Please keep learning.

  • @nitingupta82
    @nitingupta82 6 років тому +1

    Nice Explanation!! Thank you!!

  • @riteshkumar6403
    @riteshkumar6403 6 років тому

    Very informative video.

  • @ITsMeSimna
    @ITsMeSimna 5 років тому +2

    Thanks a lot!!! very helpful 🙂

    • @Mukeshotwani
      @Mukeshotwani  5 років тому

      Thank you Simna I m Glad it helped u 😊

  • @varunsharma1383
    @varunsharma1383 2 роки тому +1

    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?

    • @Mukeshotwani
      @Mukeshotwani  2 роки тому

      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);

  • @rupaksahu6184
    @rupaksahu6184 6 років тому +1

    Hii.. Mukesh..Nice explanation!!... please make a video on browser notification..like how to handle allow and block.. notification..
    Thanks a prior!

    • @Mukeshotwani
      @Mukeshotwani  6 років тому +1

      Hi Rupak, This is the article link learn-automation.com/disable-chrome-notifications-selenium-webdriver/

    • @rupaksahu6184
      @rupaksahu6184 6 років тому +1

      Thanks.. Mukesh..

  • @sagarsai6818
    @sagarsai6818 3 роки тому

    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

    • @jesnathomas9307
      @jesnathomas9307 3 роки тому

      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.

  • @santooveluri7128
    @santooveluri7128 6 років тому +1

    Hi Mukes.., as you said , can you add one more example explaining hashmap in Selenium..

  • @ravirai7054
    @ravirai7054 6 років тому +2

    Guess the explanation should be more meaningful when you include collections practical usage with selenium .. with findelements like stuff..Still good attempt..

    • @Mukeshotwani
      @Mukeshotwani  6 років тому

      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.

    • @ravirai7054
      @ravirai7054 6 років тому +1

      Mukesh otwani great thanks..

  • @muthuvel2390
    @muthuvel2390 6 років тому

    Hi mukesh, can you pls make video of enum concept and how to use in hash map

  • @jneeraj2011
    @jneeraj2011 5 років тому +3

    this is the link which you missed to put on the description..docs.oracle.com/javase/7/docs/api/java/util/HashMap.html

  • @TheNishi42
    @TheNishi42 6 років тому +1

    Is there any video or series focused on collections(Array, linked list and Hashmap)..

    • @Mukeshotwani
      @Mukeshotwani  6 років тому

      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

    • @surwase1
      @surwase1 6 років тому

      Mukesh otwani - can you create a playlist of this

  • @vaibhavumale2975
    @vaibhavumale2975 4 роки тому +1

    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..

    • @Mukeshotwani
      @Mukeshotwani  4 роки тому

      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.

  • @ravikumarm3038
    @ravikumarm3038 5 років тому +1

    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?

    • @ashishnitkb
      @ashishnitkb 5 років тому

      Ravikumar M it would override

  • @hatilaprogrammer999
    @hatilaprogrammer999 2 роки тому +1

    Sir what is happening at the time of loop can you explain

    • @Mukeshotwani
      @Mukeshotwani  2 роки тому +1

      Hi Halitha, I will do one more video on this.

  • @nageenashaik8166
    @nageenashaik8166 4 роки тому +1

    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

    • @Mukeshotwani
      @Mukeshotwani  4 роки тому +1

      Sure Nageena will make video for same.

    • @nageenashaik8166
      @nageenashaik8166 4 роки тому

      I want this using selenium with testNG and hashmap... I forgot to mention that