Map Interface in Java | Java Collections | Collection Framework | Java Tutorial For Beginners

Published: 10 July 2022
on channel: Krishna Sakinala
312
4

Please use the following link to install the Katalon Studio:

https://katalon.com/sign-up?getr=kris... Check Tubebuddy Features Here:
https://www.tubebuddy.com/krishnasaki... #javamap #map #mapinjava #javacollections #collectioninterface

Map:

To represent a group of objects as Key-Value pairs then we should go for Map.
Both Keys and Values are Objects in a Map.
Duplicate Keys are NOT allowed.
Duplicate Values are allowed.
Each Key-Value pair is called an Entry.

Methods defined in Map Interface:

Object put(Object key, Object value): To add a Key-Value pair. If the Key is already available, then old value will be replaced with new value and returns old value.
void putAll(Map m): To add another map.
Object get(Object key): To get the specified Value associated with the Key.
Object remove(Object key): To remove the entry which is associated with the Key.
boolean containsKey(Object key): To verify specified Key available in the Map.
boolean containsValue(Object value): To verify specified value available in the Map.
boolean isEmpty(): To verify Map is empty or not?
int size(): To get the size of the Map.
void clear(): To remove all the elements from the Map.
Set keySet(): To get all the Keys from the Map.
Collection values(Object value): To get all the Values from the Map.
Set entrySet(): To get the entry from the Map.


Java Tutorial For Basics - https://bit.ly/3zZw25Q
Protractor with Javascript - https://bit.ly/2jZ5XkX
Selenium Java Tutorial - https://bit.ly/2keM2Pb
Jasmine Tutorial - https://bit.ly/2lv0m6l
Java - https://bit.ly/2lylSHq
TestNG Tutorial - https://bit.ly/2lTpB2d
PdfUtil - https://bit.ly/2keBDTA
Shutterbug - https://bit.ly/2lX6xQV
Selenium Realtime Examples - https://bit.ly/2k0FqDQ
Java Interview Questions - https://bit.ly/2kopsmY
Katalon Studio - https://bit.ly/2lWhyln
Database Testing - https://bit.ly/2ko4jcJ
Fillo Excel API - https://bit.ly/2jRyWqC
Ashot - https://bit.ly/2kqXk2y
Extent Reports Version 3 Java - https://bit.ly/2k0FweG
Robot class - https://bit.ly/2lshPfJ
Sikuli - https://bit.ly/2lTq2cR
Excel Read Write using Java - https://bit.ly/2lyXRj8
AutoIt - https://bit.ly/2lyIYgM
Extent Reports Version 2 C# - https://bit.ly/2kqIY2d
Extent Reports Version 2 Java - https://bit.ly/2k0XkGA

Facebook :   / automationtesting2016  
LinkedIn : https://www.linkedin.com/feed/?trk=hb...
Google+ : https://plus.google.com/1052863009260...
Twitter :   / krishnasakinala  
Website : http://automationtesting.in/