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:
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
Building Java Programs A Back To Basics Approach
ISBN: 9780135471944
5th Edition
Authors: Stuart Reges, Marty Stepp
Question Posted: