You have to put your Test5D class in the test5 package.
You have to use recursion.
You must not use any kind of for statement or while statement.
Other questions
Consider the following method:
/**
* Returns true if the character c appears in s, and false otherwise.
*
* @param s a string
* @param c a character to search for in s
* @return true if the character c appears in s, and false otherwise.
*/
public static boolean contains(String s, char c) {
int result = false;
if (s.isEmpty()) {
result = false;
}
else if (s.charAt(0) == c) {
result = true;
}
else {
String t = s.substring(1, s.length());
result = contains(t , c);
}
return result;
}