java - Convert method with loop for, without parameters, into a recursive method -
i have working method mostfrequent() loop 'for', need convert same recursive method mostfrequent() without parameters:
public char mostfrequent() { int maxnum = 0; int num = 97; for(int = 0; < 26; i++) { maxnum = howmany(num) //do something; num++; } return ...something; } a method howmany(num) recursive , don't want change it. need same method mostfrequent(), recursive, without loops. thanks.
int = 26; int num = 97; public char mostfrequent() { if(i == 0) return .. something; int maxnum = 0; maxnum = howmany(num) //do something; num++; i--; mostfrequent(); } i did information have, recursive.
Comments
Post a Comment