Limited access

Upgrade to access all content for this subject

You are asked to develop a method that can be used as the only argument in a conditional statement to determine whether a given sentence contains the letter "Z". The sentence is passed as a parameter to the method.

What could the signature of this method look like?

A
public static void containsZ(String a)
B
public static boolean containsZ(String a)
C
public static String containsZ(boolean a)
D
public static int containsZ(String a)
E
public static boolean containsZ()
Select an assignment template