You have to put your Test5G 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:
/**
* Checks if the length of the given string is even.
* A length of zero is considered even.
*
* @param s a string
* @return true if s.length() is an even number
*/
public static boolean isEven(String s) {
boolean result = false;
if (s.isEmpty()) {
result = true;
}
else if (s.length() == 1) {
result = false;
}
else {
result = isEven(s.substring(2));
}
return result;
}