programming problems samples in Java