little program written in Java