Advertisements
Advertisements
प्रश्न
Given that:
String kr = "Albert Einstein";
int pr = kr.indexOf('e');
What will be the value of pr?
विकल्प
4
3
12
13
MCQ
Advertisements
उत्तर
3
Explanation:
- The string is Albert Einstein.
indexOf('e')returns the index of the first lowercase 'e'.- The first lowercase 'e' is in Albert at index 3 (counting starts from 0).
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 10: String Handling - Exercises [पृष्ठ २४५]
