Some basic programs in Java