home

Java Cheat Sheet

Standard Library Classes

java.lang.ThreadLocal

Regular Expressions

Getting Individual Words from a String

class Foo {
    String WORD_REGEXP = "[\\PL+]+";
    void foo() {
        "foo, bar.. baz??? qux! (quux)".split(WORD_REGEXP); // [foo, bar, baz, qux, quux]
    }
}