Answer:
public static boolean beginsWithZ(String word) string.length() == 0)
return 0;
if(word.charAt(0) == 'Z'
Step-by-step explanation:
This method is a boolean method, meaning it returns true if the string begins with Z or z and false otherwise. So:
The Java command charAt() let's you find the character at each position of the string, so i use it.
public static boolean beginsWithZ(String word) string.length() == 0)
return 0;
if(word.charAt(0) == 'Z'