If, in actions instituted under paragraph "b" of sectionof this title, the tenant or person in possession of the demised premises shall at any time on or before entry of final judgment, pay to the clerk of the court the rent claimed to be in default, together with the accrued costs of the proceedings, all proceedings shall be stopped. The receipt of the clerk shall be evidence of such payment.
The clerk shall forthwith pay all moneys so received to the landlord, his agent or assigns.
N.J.S. § 2A:18-55