In a p-n junction diode