String na="finder'; char s=na.charAt(4); char z =na.charAt(2);
Answers
Answered by
1
After Execution:
s = 'e'
z = 'n'
Answered by
2
Question:-
Write the output of the following code.
Solution:-
Given,
String na="finder";
char s=na.charAt(4);
char z=na.charAt(2);
So,
s='e' (character at index 4 in variable na)
z='n' (character at index 2 in variable na)
Index value starts with 0.
Similar questions