← Optum (UnitedHealth Group) questions
Low-Level DesignReported in a candidate post, Oct 2020

Public fields versus private fields with getters and setters

Filed under Optum (UnitedHealth Group)

A class Employee has id, name and salary and is passed to a business layer. Compare using public data members versus private members with getters and setters, say which you would prefer, and justify…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Optum (UnitedHealth Group) questions

Collected from public candidate posts and coding forums. Updated Nov 2026.