Strings review

What you need to know for Monday’s assessment.

How to write literal string values

'foobar'

'this is a string with spaces'

The two string operators

+ and []

What they do and how to use them in expressions.

Three string methods

substring

toUpperCase

toLowerCase

How to invoke those methods

Given a string s:

s.substring(1)

s.substring(0, s.length - 3)

s.toUpperCase()

s.toLowerCase()

As before, try to write an expression

Even if you get stuck on the function syntax, try to write something that looks like a correct expression using meaningful names.

You’ll at least get credit for your understanding of string expressions.