implemented tokenizer strings, no files) in Java