if ( A.length() == 1) { result = A; return result; } above code can be added.
if ( A.length() == 1) {
result = A;
return result;
}
above code can be added.