Java TOPIC 51 – TEST REVIEW DETAILS & REVIEW
DETAILS
Minor
programming errors will not count against you. The test
covers everything in the unit. REVIEW QUESTION 1 – DEFINITIONS You should be
comfortable with the following terms:
QUESTION 2 – STRING
METHODS What do the
following methods do?
QUESTION 3 – SHORT
ANSWER QUESTIONS Answer the
following questions: a)
Can
a String object be changed? b)
Is
the String class mutable or immutable? c)
The
first index in a String is _____. d)
Is
the equals() method case sensitive? e)
“hello”.substring(0,2) returns
_____. f)
“hello”.substring(2) returns
_____. g)
When
the + symbol is used between strings, it is called _____ _____. QUESTION 4 – CODING
QUESTIONS a) Write the program
that gets a String from the user and outputs it such that the first letter is
capitalized and the rest of the word is in lower case. b) Write a
program that gets a String from the user and outputs it one letter at a time
to the screen. c) Alter your
code from the previous question so that the String is outputted one letter at
a time but backwards. |
|
You can now tell people that you know
String Theory! J |
|
|