Look up the String.substring(int, int) method in the Java API.
String s1 = "literally";
String s2 = s1.substring(0, 7);
System.out.println(s2) // prints: literal
In our case, the substring...
Type: Posts; User: literallyjer
Look up the String.substring(int, int) method in the Java API.
String s1 = "literally";
String s2 = s1.substring(0, 7);
System.out.println(s2) // prints: literal
In our case, the substring...
Then check to see if the first character of the string is the passed in character. If so, return one plus the results of the freq() with the first character removed from the string. Otherwise, just...