State the return data type of the following functions:
i. indexOf();
ii. charAt();
Answers
Answered by
1
(i) This method returns the first occurance of a character or a sub-string in the string. It returns integer value.
e.g. : int r = s1.indexOF(“DAY”);
string s1 = “HAPPY BIRTHDAY”; System.out.println(r);
Output : 11
e.g. : int r = s1.indexOF(“DAY”);
string s1 = “HAPPY BIRTHDAY”; System.out.println(r);
Output : 11
Answered by
0
Answer:
Happiest birthday
Explanation:
God bless you
Similar questions