DEV Community

loading...

Discussion on: Daily Challenge #1 - String Peeler

Collapse
rahul0706 profile image
rahul0706

public static String removeFirstAndLastLetter(String str) {
if(str.length()>2) {
return str.substring(1, str.length()-1);
}
return null;
}

Forem Open with the Forem app