Question
Tutorial - Strings, OO Concepts Strings 1. Evaluate the following expressions. For those methods not covered in lectures, use the API to discover how they
Tutorial - Strings, OO Concepts
Strings
1. Evaluate the following expressions. For those methods not covered in lectures,
use the API to discover how they work (a "learning to learn" Graduate Quality
2).
a. "y" + 2 + 3
b. "y" + (3 + 4)
c. 2 + 3 + "y"
d. 2 + (3 + "y")
e. "y" + (2 + 3) + "z"
f. "y" + 2 + 3 + "z"
g. "Luct".length( )
h. " Luct ".charAt(3)
i. " Luct ".replace('u', 'k')
j. " Luct ".substring(1, 3)
k. " Luct ".substring(2)
l. " Luct ".equalsIgnoreCase("luct")
2. Explain how the implementation of substring(int beginIndex) would
take advantage of substring(int beginIndex, int endIndex).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started