Multiple Choice Question

Quiz Guidelines

 

QID: 
105
Question: 

Which of the following correctly defines a method named stringProcessor that can be called by other programmers as follows: stringProcessor(str1) or stringProcessor(str1, str2) or stringProcessor(str1, str2, str3),
where str1, str2, and str3 are references to Strings.

Select 1 option

A. public void stringProcessor(...String){
}
B. public void stringProcessor(String... strs){
}
C. public void stringProcessor(String[] strs){
}
D. public void stringProcessor(String a, String b, String c){
}
E. Three separate methods need to be written.

Q&A Set: