Search Interview Questions | Click here and help us by providing the answer. Click Correct / Improve and please let us know. |
|
|||
|
| ||||
| Interview Questions and Answers | ||||
| ||||
| Ans. It will give compile time error saying "The final field array.length cannot be assigned" Arrays once initialized cannot be resized. | ||||
String[] strArray = new String[2]; strArray = new String[5]; | ||||
String[] strArray = new String[]; | ||||
String[] strArray = new String[]{"Buggy","Bread"}; | ||||
String[] strArray = new String[3]{"Buggy","Bread"}; | ||||