LeetQuiz Logo
Privacy Policy•contact@leetquiz.com
© 2025 LeetQuiz All rights reserved.
Google Professional Cloud Developer

Google Professional Cloud Developer

Get started today

Ultimate access to all questions.


Which improvement would you recommend for the following Cloud Datastore code that adds a credit to an account balance?

public Entity creditAccount(long accountId, long creditAmount) {
    Entity account = datastore.get(keyFactory.newKey(accountId));
    account = Entity.builder(account)
                   .set("balance", account.getLong("balance") + creditAmount)
                   .build();
    datastore.put(account);
    return account;
}

Exam-Like



Powered ByGPT-5