Chapter 12. From Characters to String Tokenizers
A long time ago, computers could only “crunch numbers.” It wasn't until someone discovered how to relate binary numbers to visual symbols that computers could also be used to process text, which has resulted in many useful text and word processing programs. Fundamentally, text begins with characters, and characters can be strung together into strings that represent sentences, paragraphs, and anything “textual.” Because Java regards strings as immutable (read-only), Java also provides string buffers for those situations in which mutable strings are necessary. Sometimes, a string must be reduced to its elemental parts (tokens) so that meaning can be extracted from the string. Java supports that tokenization ...
Get Java™ 2 by Example, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.