Java sample programs