static keyword missing
array elements should be initialized using single quotes
array elements should be in square brackets
array name should be strCities()
Answer is Right!
Answer is Wrong!
The correct answer is: C. array elements should be in square brackets
The statement Dim strCities As String = {"Bombay", "Chennai", "Ladakh", "Tamil Nadu"}
is trying to create an array of strings, but it is missing the square brackets []
that are required to specify the array elements. The correct statement would be:
Dim strCities As String() = {"Bombay", "Chennai", "Ladakh", "Tamil Nadu"}
Option A is incorrect because the static
keyword is not required to declare an array. Option B is