some small yet useful java beginner programs