Assuming that the following variables have been declared: evaluate the following expressions: a. str1.length() b. str1.charAt(7) c.

Question:

Assuming that the following variables have been declared:

// index 0123456789012345 String stri =

evaluate the following expressions:

a. str1.length()

b. str1.charAt(7)

c. str2.charAt(0)

d. str1.indexOf("o")

e. str2.toUpperCase()

f. str1.toLowerCase().indexOf("B")

g. str1.substring(4)

h. str2.substring(3, 14)

i. str2.replace("a", "oo")

j. str2.replace("gray", "white")

k. "str1".replace("r", "range")

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: