The problem with any “check first and then do” strategy is that there may be changes between “check” and “do” that make the whole thing useless.
", " , , . "check first", , .
. - , , , .
, , . Java , -, , (, ).
, , , , , . 400M, 600, , 400M.
, (, 600 1M), , 400. , 400 .
, , , , , . , . , .
, , , (, 100M 10% - ), . . - , , .