Could anyone please explain or clarify for me? How the expressions below are derived and used. I mean need to know why we are using in the below image “new” to declare another string array.
An addition to all the above posts, We can test and check what happens when we use an Array String variable directly without initialisation and when used with the Initialisation.
Below are two variables used to demonstrate the differences and also the reasons as to why we would have to initialise the arrays :
You could notice that the variable which is not initialised provides us with null value, which in turn provides us with errors when checked with array methods such as Count, Append, Concat etc.