What Strings are stored in array words after the following code executes?
```
1 String words[] = { "dance", "walk", "talking", "eat" };
2
3 for ( int counter = 0; counter <= words.length - 1; counter++ )
4 {
5 if ( words[ counter ].endsWith( "e" ) )
6 {
7 words[ counter ] = words[ counter ].substring(
8 0, words[ counter ].length() - 1 );
9 }
10
11 if ( !( words[ counter ].endsWith( "ing" ) ) )
12 {
13 words[ counter ] += "ing";
14 }
15
16 } // end for loop
```
After the code executes, each String in words is converted to its "-ing" form. The final words are "dancing", "walking", "talking" and "eating".
You might also like to view...
Discuss the advantages of graphical information display and suggest four applications where it would be more appropriate to use graphical rather than digital displays of numeric information.
What will be an ideal response?
What command is used to determine the version of the Cisco IOS?
What will be an ideal response?
The symbol GB refers to a ____.
A. giantbyte B. gigabyte C. groupbyte D. graphic bit
The MEDIAN function finds ________
A) the one number that corresponds to an argument in the function B) the middle value in a range of cells C) all numbers that correspond to an argument in the function D) the average value in a range of cells