A developer used a dictionary to store employee ID numbers as the key with associated employee surnames as the value What is the benefit of using a dictionary?
A.
Dictionaries can have repeated keys
B.
Dictionaries must have unique values
C.
Dictionaries can be searched by keys or values
D.
Dictionary keys and values can be of different data types
The benefit of using a dictionary is that dictionary keys and values can be of different data types. A dictionary is a collection of key-value pairs, where each key is associated with a value. The key and the value can be of any data type, such as String, Integer, Boolean, Object, etc. This allows for more flexibility and versatility in storing and retrieving data3. For example, a dictionary can store employee ID numbers as the key with associated employee surnames as the value, where the key is of type Integer and the value is of type String. To access the value of a specific key, the syntax dictionaryName(key) can be used4. References: Dictionaries and How to use dictionary? from UiPath documentation and forum.
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit