question is :-
int count(String s, char c) that counts how many times the character c occurs inside string s.
You can use the String methods charAt and substring to extract information from string s.
* these methods are required to be fully recursive in that they contain no loops at all;
neither for, while or do-while.*
I guess this a java woreksheet i am doing.
any suggestions/ideas to solve this ?
I tried but i m stuck when i have to get a char out of string(array of char in C)
and to concatenate that in a new string but no such function in c and also i cant use any loops
I have attached the worksheet