Adam did not know that, at least from the Biblical narrative. Why was he told he could eat anything except that one tree? If he did not eat, would he have died?
no, he would not have died. the sin of breaking God’s law would have caused his temporal and eternal death. no sin, no death/judgment.