Search Interview Questions | More than 3000 questions in repository. There are more than 900 unanswered questions. Click here and help us by providing the answer. Have a video suggestion. Click Correct / Improve and please let us know. |
|
| ||||
Interview Questions and Answers | ||||
| ||||
Ans. No. It will result in error saying "Cannot define dimension expressions when an array initializer is provided" | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  arrays  array initialization | ||||
Related Questions | ||||
If arrays cannot be resized , Why is this code valid String[] strArray = new String[2]; strArray = new String[5]; | ||||
Can we declare an array without assigning the size of an array? | ||||
Is this array declaration correct ? If not , Why ? String[] strArray = new String[]; | ||||
Is this array initialization correct ? If Yes, What will be the size of array ? String[] strArray = new String[]{"Buggy","Bread"}; | ||||
Is this code valid String[] strArray = new String[2]; strArray.length = 5; | ||||