Reptiles have several adaptations that allowed them to thrive on land, including dry, scaly skin that reduces water loss and the ability to lay shelled eggs. Reptiles are ectothermic, regulating their body temperature through external heating and cooling. They have three-chambered hearts and rely on lungs for breathing. Snakes and lizards have a flexible jaw joint that allows them to swallow large prey whole. Turtles and tortoises have protective shells, while alligators and crocodiles are the closest living relatives to dinosaurs.