QuestionQ129

VerifiedVariables and Arguments

After extracting data from a website, a developer stores it in three variables: "FirstName", "LastName", and "City". The developer plans to save these three String variables in a fixed-size data structure named "UserData" for later use in another workflow in the process.

Following best practices, which data structure and assignment should be used?

Explanation

A String[] is a fixed-size array that stores multiple values of the same String type. It therefore matches both the fixed-size requirement and the types of FirstName, LastName, and City. A List<T> is resizable, and Object[] discards the more specific string type. UiPath documents arrays as variables for storing multiple values of the same type.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!