Java code samples