Private reduces the scope of access to only this class. Java has 3 explicit scopes: private, protected and public (this class, this class and child classes, and any), as well as one implicit scope of package (anything within package). When no scope is provided, package is assumed.
I always use private/protected unless the variable is final. Anything above allows direct write to the variable which means I could end up with an invalid value (0 in the case of numbers here when 0 should be checked for an an exception tossed) and nulls for objects. You don't want these conditions to ever occur, but you can enforce them by using the setter methods instead.
do is not a function but a construct. Its the same thing as a while loop but it guarantees at least one run through the loop whilst the while loop only guarantees a run if the condition is valid to start with.
header('HTTP/1.1 420 Enhance Your Calm');