What will be the output of the following program segment?
String s="apolication";
int p=s.indexOf('a');
System.out.println(p);
System.out.println(p+s);
Answers
Answered by
2
Answer:
The Answer will be 0
Explanation:
Answered by
0
Answer:
output:
0
0apolication
Explanation:
First one displays the index value 0(Zero)
Second ouput concatenate the indexvalue and the string together
Similar questions