An image forming apparatus comprising: a developing cartridge comprising: a casing configured to accommodate developing agent therein; a developing memory; a first electrical contact surface electrically connected to the developing memory; and a first holder holding the first electrical contact surface and movable relative to the casing in a prescribed direction (third direction) crossing the first electrical contact surface; a drum cartridge to which the developing cartridge is detachably attachable, the drum cartridge comprising: a drum frame; a photosensitive drum; a drum memory; a second electrical contact surface electrically connected to the drum memory; and a second holder holding the second electrical contact surface and movable relative to the drum frame in the prescribed direction; and a main frame having an opening, the drum cartridge to which the developing cartridge is attached being detachably attachable to the main frame through the opening, the main frame comprising: a guide frame for guiding attachment of the drum cartridge to which the developing cartridge is attached; a first main electrical contact positioned at the guide frame, the first main electrical contact being capable of being electrically connected to one of the first electrical contact surface and the second electrical contact surface; and a second main electrical contact positioned at the guide frame and positioned closer to the opening than the first main electrical contact is to the opening in an attachment direction (second direction) of the drum cartridge relative to the main frame, the second main electrical contact being capable of being electrically connected to a remaining one of the first electrical contact surface and the second electrical contact surface. a developing cartridge comprising: a casing configured to accommodate developing agent therein; a developing memory; a first electrical contact surface electrically connected to the developing memory; and a first holder holding the first electrical contact surface and movable relative to the casing in a prescribed direction (third direction) crossing the first electrical contact surface; a casing configured to accommodate developing agent therein; a developing memory; a first electrical contact surface electrically connected to the developing memory; and a first holder holding the first electrical contact surface and movable relative to the casing in a prescribed direction (third direction) crossing the first electrical contact surface; a drum cartridge to which the developing cartridge is detachably attachable, the drum cartridge comprising: a drum frame; a photosensitive drum; a drum memory; a second electrical contact surface electrically connected to the drum memory; and a second holder holding the second electrical contact surface and movable relative to the drum frame in the prescribed direction; and a drum frame; a photosensitive drum; a drum memory; a second electrical contact surface electrically connected to the drum memory; and a second holder holding the second electrical contact surface and movable relative to the drum frame in the prescribed direction; and a main frame having an opening, the drum cartridge to which the developing cartridge is attached being detachably attachable to the main frame through the opening, the main frame comprising: a guide frame for guiding attachment of the drum cartridge to which the developing cartridge is attached; a first main electrical contact positioned at the guide frame, the first main electrical contact being capable of being electrically connected to one of the first electrical contact surface and the second electrical contact surface; and a second main electrical contact positioned at the guide frame and positioned closer to the opening than the first main electrical contact is to the opening in an attachment direction (second direction) of the drum cartridge relative to the main frame, the second main electrical contact being capable of being electrically connected to a remaining one of the first electrical contact surface and the second electrical contact surface. a guide frame for guiding attachment of the drum cartridge to which the developing cartridge is attached; a first main electrical contact positioned at the guide frame, the first main electrical contact being capable of being electrically connected to one of the first electrical contact surface and the second electrical contact surface; and a second main electrical contact positioned at the guide frame and positioned closer to the opening than the first main electrical contact is to the opening in an attachment direction (second direction) of the drum cartridge relative to the main frame, the second main electrical contact being capable of being electrically connected to a remaining one of the first electrical contact surface and the second electrical contact surface.