Updated Java code !