Initial Java code