In this chapter Job gives an account of himself in private life, of the integrity and uprightness of his life, and his holy walk and conversation, with this view, that it might be thought that the afflictions which were upon him were not on account of a vicious course of life he had indulged unto, as was suggested; and he clears himself from various crimes which it might be insinuated he was guilty of, as from unchastity; and he observes the method he took to prevent his falling into it, and the reasons that dissuaded him from it, Job 31:1-4; from injustice in his dealings with men, Job 31:5-8; from the sin of adultery, Job 31:9-12; from ill usage of his servants, Job 31:13-15; from unkindness to the poor, which he enlarges upon, and gives many instances of his charity to them, Job 31:16-23; from covetousness, and a vain confidence in wealth, Job 31:24,25; from idolatry, the worship of the sun and moon, Job 31:26-28; from a revengeful spirit, Job 31:29-31; and from inhospitality to strangers, Job 31:32; from covering his sin, Job 31:33; and fear of men, Job 31:34; and then wishes his cause might be heard before God, Job 31:35-37; and the chapter is closed with an imprecation on his head if guilty of any injustice, Job 31:38-40.