Name ______________________
Assume the following:
String h, a; h = "Hello"; a = "abc";
Give the values of the following expressions.
| 1 | __________ | h.length() |
| 2 | __________ | h.substring(2, 3) |
| 3 | __________ | h.substring(1) |
| 4 | __________ | h.toUpperCase() |
| 5 | __________ | h.toUpperCase().toLowerCase() |
| 6 | __________ | h.indexOf("H") |
| 7 | __________ | h.indexOf("h") |
| 8 | __________ | "Tomorrow".indexOf("o") |
| 9 | __________ | "Tomorrow".lastIndexOf("o") |
| 10 | __________ | "Ans: " + 1 + 2 |
| 11 | __________ | a.length() + a |
| 12 | __________ | h.substring(0, h.length()) |