Java simple work