Question: 10. What's wrong with the following code segment? int i,j; String[] names; names[0] = new String(mary); names[1] = john; i = j = names.length;
![10. What's wrong with the following code segment? int i,j; String[] names;](https://dsd5zvtm8ll6.cloudfront.net/questions/2024/03/65f274144fc96_1710391761550.jpg)
10. What's wrong with the following code segment? int i,j; String[] names; names[0] = new String("mary"); names[1] = "john"; i = j = names.length; names[0].length();
Step by Step Solution
There are 3 Steps involved in it
int ij String names declaration of array names0 new Stringmary initialisation and assigning values s... View full answer
Get step-by-step solutions from verified subject matter experts
