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

 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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!