Yes, you can cook corn in an air fryer. In fact, it is a great method of cooking fresh corn without heating up your house in the summer. Keep in mind that cooking times may vary depending on the size and thickness of the corn, as well as the specific model of the air fryer. It's always a good idea to check on the corn periodically to prevent overcooking.