Finalised the Java program