Kotlinlearncs.online LogoJava
Return to List

Solve: Last Chars

Imported By: Geoffrey Challen
/ Version: 2021.5.0

Given 2 Strings, first and second, return a new String made of the first character of first and the last character of second. So "yo" and "java" yields "ya". If either string is length 0, use '@' for its missing char.

String lastChars(String first, String second) {
return ""; // You may need to remove this starter code
}

Related Lessons

Stuck? You may find these lessons helpful: