Hammurabi and Justinian are both similar because they both established one of the first examples of written law, some still used today.
Justinian rewrote the Roman law and Hammurabi is known for the set of laws called "Hammurabi's Code" which is one of the first written codes of law in recorded history.