Java simple example