Can the start date in new company be same as the end date in old company

Can the start date in new company be same as the end date in old company for an H1b holder? Is it okay to join new company the same day we resign the existing company?

Will getting double payrolls for same day be an issue in future?