Question: Complete the static method lastCharacters, which returns a String that tells what the last two characters in a word are (The last two characters in
Complete the static method lastCharacters, which returns a String that tells what the last two characters in a word are ("The last two characters in that word are _____.") The word is passed in as an argument.
public static String lastCharacters (String word) {
** complete the code ** }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
