SimpleBindings putAll() method in Java with Examples
The putAll() method of SimpleBindings class is used to add all the key-value pairs of the map which is passed as a parameter to SimpleBindings object.
public void putAll(Map<String, Object> toMerge)
parameters: This method accepts parameter toMerge which is the Map of values to add.
Return Value: This method returns nothing.
Exception: This method throws following exceptions:
- NullPointerException: if toMerge map is null or if some key in the map is null.
- IllegalArgumentException: if some key in the map is an empty String.
Below are programs to Illustrate the working of putAll() method:
Key1:value1 Key2:value2 Key3:value3
Team1: India Team2: Sri Lanka Team3: Pakistan Team4: Bangladesh
My Personal Notes arrow_drop_up
Please Login to comment...