previous | start | next

Self Check

  1. Assuming the String variable s holds the value "Agent", what is the effect of the assignment s = s + s.length()?
  2. Assuming the String variable river holds the value "Mississippi", what is the value of river.substring(1, 2)? Of river.substring(2, river.length() - 3)?

previous | start | next