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...
Notes concerning the active slide are entered into the Slide pane
Indicate whether the statement is true or false
Which of the following function prototypes is valid?
A. int funcExp(int x, float v); B. funcExp(int x, float v){}; C. funcExp(void); D. int funcExp(x);