Computer Science, asked by albein1323, 11 months ago

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 GopalGublu
2

Answer:

The Answer will be 0

Explanation:

Answered by nharshiniharshini
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