An air conditioner comprising: a compressor; a heat exchanger performing heat exchange between a refrigerant and air through movement of the air; a frost formation detector provided in the heat exchanger for detecting a frost formation degree in the heat exchanger to output a detection signal; and a controller configured to compute a frost formation level due to freezing in the heat exchanger according to the detection signal inputted from the frost formation detector, and to perform a defrosting operation according to the frost formation level, characterized in that the frost formation detector comprises a plurality of switches (S1 to S6), wherein the switches are arranged in a body, which is longitudinally provided at the heat exchanger; and wherein each switch (S1 to S6) comprises: a plurality of electrodes (132; 133) protruding from the body in one direction; and insulation parts for isolating electric contacts between the electrodes (132; 133) and the heat exchanger, respectively, wherein the frost formation detector comprises a circuit arrangement comprising a plurality of resistors (R1 to R9) and the plurality of switches (S1 to S6), wherein the resistance of the circuit arrangement is changed according to whether any one or several switches (S1 to S6) is turned on so that detection signals having different magnitudes are outputted to the controller, wherein the controller is configured to classify a magnitude of the detection signal into a plurality of levels and to determine a frost formation level as one of the levels, wherein one terminal of each of the electrodes (132; 133) is fixed to the body, and another terminal of each electrode (132; 133) is inserted into the heat exchanger, so that the electrodes (132; 133) are configured to be bent, and wherein the electrodes (132; 133) are configured to be bent to a central portion so that the electrodes (132; 133) are configured to make contact with each other to act as a switch (S1 to S6) due to the freezing in the heat exchanger. a compressor; a heat exchanger performing heat exchange between a refrigerant and air through movement of the air; a frost formation detector provided in the heat exchanger for detecting a frost formation degree in the heat exchanger to output a detection signal; and a controller configured to compute a frost formation level due to freezing in the heat exchanger according to the detection signal inputted from the frost formation detector, and to perform a defrosting operation according to the frost formation level, characterized in that the frost formation detector comprises a plurality of switches (S1 to S6), wherein the switches are arranged in a body, which is longitudinally provided at the heat exchanger; and wherein each switch (S1 to S6) comprises: a plurality of electrodes (132; 133) protruding from the body in one direction; and insulation parts for isolating electric contacts between the electrodes (132; 133) and the heat exchanger, respectively, wherein the frost formation detector comprises a circuit arrangement comprising a plurality of resistors (R1 to R9) and the plurality of switches (S1 to S6), wherein the resistance of the circuit arrangement is changed according to whether any one or several switches (S1 to S6) is turned on so that detection signals having different magnitudes are outputted to the controller, wherein the controller is configured to classify a magnitude of the detection signal into a plurality of levels and to determine a frost formation level as one of the levels, wherein one terminal of each of the electrodes (132; 133) is fixed to the body, and another terminal of each electrode (132; 133) is inserted into the heat exchanger, so that the electrodes (132; 133) are configured to be bent, and wherein the electrodes (132; 133) are configured to be bent to a central portion so that the electrodes (132; 133) are configured to make contact with each other to act as a switch (S1 to S6) due to the freezing in the heat exchanger. a plurality of electrodes (132; 133) protruding from the body in one direction; and insulation parts for isolating electric contacts between the electrodes (132; 133) and the heat exchanger, respectively, wherein the frost formation detector comprises a circuit arrangement comprising a plurality of resistors (R1 to R9) and the plurality of switches (S1 to S6), wherein the resistance of the circuit arrangement is changed according to whether any one or several switches (S1 to S6) is turned on so that detection signals having different magnitudes are outputted to the controller, wherein the controller is configured to classify a magnitude of the detection signal into a plurality of levels and to determine a frost formation level as one of the levels, wherein one terminal of each of the electrodes (132; 133) is fixed to the body, and another terminal of each electrode (132; 133) is inserted into the heat exchanger, so that the electrodes (132; 133) are configured to be bent, and wherein the electrodes (132; 133) are configured to be bent to a central portion so that the electrodes (132; 133) are configured to make contact with each other to act as a switch (S1 to S6) due to the freezing in the heat exchanger.