pre java-8 samples