what will be the output of the following segments? string s ="application"; int p =s.indexof('a'); system.out.println(p); system.out.println(p+s);
Answers
Answered by
50
First of all there are plenty of mistakes in the code.
The correct code is :
String s="application";
int p=s.indexOf('a'); // p gets value '0'
System.out.println(p);
System.out.println(p+s);
Output:
0
0application
Pl mark brainliest if satisfied............
sreeramanasp6k3fx:
ICSE ?
Answered by
4
Answer:
0
0application
Explanation:
the index of a is 0 so first 0 is printed
in the next print case p+s is there so 0application
Similar questions
English,
6 months ago
English,
6 months ago
Psychology,
6 months ago
English,
1 year ago
Chemistry,
1 year ago