Question: Question 1 Consider the following code: What would be output when the following code is exacuted? String[] word = {algorithm, boolean, int, double); for (int

![the following code is exacuted? String[] word = {"algorithm", "boolean", "int", "double");](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f52b92c1d3c_50666f52b924234c.jpg)
![for (int i = 0; i words[i].length()) { s = i; }](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f52b938eb08_50766f52b930b0cb.jpg)
![} System.out.println(words[s]); What is output? BEREFT BENIGN BENEVOLENCE O BERATED Question 5](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f52b944f39a_50766f52b93cb395.jpg)


Question 1 Consider the following code: What would be output when the following code is exacuted? String[] word = {"algorithm", "boolean", "int", "double"); for (int i = 0; i words[i].length()) { s = i; } } System.out.println(words[s]); What is output? BEREFT BENIGN BENEVOLENCE O BERATED Question 5 1 pts The following code is intended to count how many "hard" spelling words are assigned in a week. A hard spelling word is defined as having more than 5 letters. Consider the following code: String[] list = /* initialized to the spelling words */; int hard = @; for (int i = @; i 5 list.length[i] > 5 O list[i]. length > 5 list[i].length() > 5 O list.length > 5 Question 6 1 pts A student is having trouble remembering how to spell words that end in -ing. She needs a program to count how many ing words she has each week in her spelling list. Consider the following code: String[] list = /* initialized to the spelling words */; int ing = 0; for (int i = 0; i 3) { if (/* missing code */) { ing++; } 1 } System.out.println("Number of ing words: " + ing); Which of the following could be used to replace /* missing code */ so that this works as intended? O list[i].equals("ing") list[i].substring(list[i].length() 3, 3).equals("ing") O list[i].substring(4, 7).equals("ing") list.substring(list.length) - 3, list.length() ).equals("ing") O list[i].substring(list[i].length() - 3, list[i].length() ).equals("ing")
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
