Solved

The Method Below Generates All Nonempty Substrings of a Word

Question 59

Multiple Choice

The method below generates all nonempty substrings of a word passed as argument.Assuming that the string contains no duplicate characters, select the statement to complete the method so that it prints all nonempty substrings correctly. The method below generates all nonempty substrings of a word passed as argument.Assuming that the string contains no duplicate characters, select the statement to complete the method so that it prints all nonempty substrings correctly.    A) printSubstrings(word.substring(0) ) ; B) printSubstrings(word.substring(1) ) ; C) printSubstrings(word.substring(word.length() ) ) ; D) printSubstrings(word.substring(word.length()  - 1) ) ;


A) printSubstrings(word.substring(0) ) ;
B) printSubstrings(word.substring(1) ) ;
C) printSubstrings(word.substring(word.length() ) ) ;
D) printSubstrings(word.substring(word.length() - 1) ) ;

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions