Do you think that the following is correct?
str1.length() = 12 ; // change the length of str1
No. The left side of an assignment statement must be a variable.
It has been a long time since you have had some blanks to fill in. I'm sure that you miss them. Complete the above program so that it
String
objects.String
holds the characters "Green eggs".String
holds the characters " and ham". Fill in the blanks of the program. Here are some random jottings you may wish to paste into the blanks:
length() new String (" and ham.") str1 str2 ( + ) len1 len2 () "Green eggs"