Consider the processWords method. Assume that each of its two parameters is a string of length two or more. public void processWords (String wordi, String word2) { String strl = wordl.substring(0, 2); String str2 = word2.substring(word2.length() - 1); String result = str2 + strl; System.out.println(result.indexOf(str2)); } Which of the following best describes the value printed when processWords is called? A The value 0 is always printed. B The value 1 is always printed. The value result.length() - 1 is printed. D) A substring containing the last character of word2 is printed. E A substring containing the last two characters of word2 is printed.



Answer :

Other Questions