|
What is printed out?String dryden = " None but the brave deserves the fair. " ; System.out.println( dryden.trim() ); A good answer might be:
(There are no printed spaces on either side of the above. The internal spaces remain.)None but the brave deserves the fair. | |||||||||||||||||||||
Control Characters inside String ObjectsThe characters that a String object contains can include control characters. For example, examine the following code:
The sequence Only to the wanderer comes Ever new this shock of beauty Although you do not see them printed, the control characters are part of the data in the String. Here is another method from the String class: public String toLowerCase(); This method constructs a new String object containing all lower case letters. | |||||||||||||||||||||
QUESTION 12:Here are some lines of code. Which ones are correct?
|