[Bluej-discuss] asking for help
Poul Henriksen
p.henriksen at kent.ac.uk
Wed Oct 18 18:20:09 BST 2006
Hi John,
I think this exercise has been invalidated by modifications to the Java
API documentation. In the documentation for JDK 1.3 it specifically
mentioned control characters in the String.trim() javadoc:
"This method may be used to trim whitespace from the beginning and end
of a string; in fact, it trims all ASCII control characters as well."
The documentation for the more current versions of the JDK means the
same thing - it is just explained in a more confusing way. Codes \u0020
and below are in fact control characters. So, just replace every
occurrence of "have codes greater than '\u0020'" with "are not control
characters" and it might make a bit more sense.
I agree that the exercise is not very good anymore, since it is unlikely
that the students can make any sense of the current documentation for
the trim method.
Poul Henriksen
John Simonds wrote:
> Exercise 5.7 asks the student to find the trim method in the Java Class libraries documentation (this I did). Then it asks what "the documentation says about control charachters at the beginnig of a string."
> I could not make heads or tails of what it said, since it went on about "Unicode charachters,"
> (which it does not elaborate as to what that means) and some obscure formula which does nothing to explain what to do with control charachters, and what are control charachters?
> I don't see this exercise as being very well defined. Could anyone clear this up?
>
>
>
> John Simonds
> Systems Technologist
> simonj2 at sage.edu
> (518)244-3111
> (518)292-1734
>
>
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> mailing list bluej-discuss at bluej.org
> To unsubscribe or change your preferences, go to
> http://lists.bluej.org/mailman/listinfo/bluej-discuss
More information about the bluej-discuss
mailing list