For Java program