Two men charged in the shooting of a Sanford police officer early Sunday appeared in court for the first time Monday.