I heard from my lecturer that electron has dual nature. For that instance in young's double slit experiment electron exhibits as a particle at ends but it acts as a wave in between the ends. It under goes diffraction and bends. But we don't see a rise in energy. It has to produce 500kev of energy (please correct if my approximation is wrong) according to mass energy equivalence relation. But wave is a form of pure energy and doesn't show properties of having mass as of experimental diffraction. So where is the mass gone?
I don't really like the whole wave-particle duality business because it obscures the more startling truth about particles: they aren't sometimes waves and sometimes particles, and they also don't transform into waves sometimes before reforming as particles, they are something completely different.
It's like the story of the blind men and the elephant: a group of blind men are trying to describe an elephant by touch, but each man is touching a different part of the elephant. The man who touches the elephant's side says it's like a rough wall, the man who touches its leg says it's like a pillar, the man who touches its tail says its like a rope, and so on. All the men are right, of course, but they simply have incomplete pictures of the elephant because they cannot observe its full character.
Similarly, when we observe the behavior of things like electrons or photons, we sometimes think they are acting as particles, and other times that they are acting as waves. But really, they are neither waves nor particles, but something new that has properties of both; it is only the case that in many cases, only their particle-like or wave-like behavior happens to be relevant to their behavior, and so we treat them as such. So while the phrase "wave-particle duality" might make it seem as if particles can become waves (hence your question), what actually exists is a strange sort of object that always has properties of both particles and waves, only one of which may be easily observable in some cases, and the question of where an electron's mass goes when it becomes a wave isn't really applicable, since it doesn't become a wave at all.
EDIT: It's worth noting, as Anna pointed out, that the wave-like character of objects isn't quite the same as a normal wave, as there isn't really any physical substance that's waving in any real sense. Instead, the "wave" is a probability function that assigns a probability to each point in space, representing the likelihood of finding the particle there; it just so happens that this function takes the mathematical form of a wave. This is a deep subject, so I'll refer you to Anna's answer for further information.
The waves of quantum mechanics are probability waves. The solutions of quantum mechanical equations are the wave functions and the square of the wave function gives the probability of finding the particle at $(x,y,z,t)$.
That is why the solutions for the electrons in the field of a nucleus are not orbits, but orbitals, i.e. probability distributions.
The wave particle duality for particles with mass says that they behave like classical particles when detected macroscopically, as in this bubble chamber picture, or as probability waves when looked at small distances, commensurate with $\hbar$. For photons the particle nature appears in the photoelectric effect, and the probability wave formalism builds up the classical electromagnetic wave with the same frequency.
It seems that you have misundrstood the wave-particle duality.
What happens in the double slit experiment is that the electrons impact at the screen as they were particles. But they also interfere, just as waves. So you can see a wave-particle behaviour.
But it doesn't say that the electron is destroyed, becomes a wave and then a particle again (as you seem to think).
But wave is a form of pure energy and doesn't show properties of having mass as of experimental diffraction.
NO, waves are not pure energy (for example, sound waves have mass). Maybe you understood that it was supposed to be an electromagnetic wave?
As a sidenote, I think that the wave-particle duality gives a wrong impression, since it's not a classical wave and it can be explained using just particles . See my answer here.
Basically, the wave effect is due to the probabilistic behaviour in quantum mechanics, why can be explained using the wavefunction. But we can predict everything using particles and no waves.
You just have to consider that the electrons passes through both slits and sum the contributions of each path:
The wave-particle duality thing becomes important when you are dealing in a microscopic scale where quantum mechanics becomes relevant and you have to discard your ordinary notion of particle and wave. So don't expect to relate "particle" or/and "wave" notion that you usually get from picturing a marble or water wave from classical world surrounding you.
Point Particle is a concept of structureless, dimensionless entity which only has its existence but no internal structure, so you can't expect an electron to be pictured as a marble ball. And wave is a concept that anything which is a function of space and time whether it is something physical or purely mathematical. So when we talk about "wave-particle duality" we actually mean that in the microscopic world scale - say for election, it's not actually wave or particle at the same time or neither, rather we mean it behaves like particle in some experiment and behaves like wave in some other experiments depending on conditions. Being a particle or wave is fundamentally very different than behaving like particle or wave. moreover we really don't know what a electron really is, for details see The Feynman Lectures on Physics.
So we demanded a wave function to the best describe a electron's nature in quantum mechanics. But when we work in quantum field theory we describe fundamental particles as a quantum field, neither the wave function or quantum field is a physical thing that you can measure or picture or relate to anything to your classical analog. These are the mathematical abstraction that helps the physicist to describe fundamental particles nature in subatomic scales and their interactions. Hope this helps.
Electron is accompained by waves, so there still exists electron which has mass. This solves your problem I hope.
Look here at what de Broglie says in his Nobel lecture of 1929 (this is an extracted portion):
I thus arrived at the following overall concept which guided my studies: for both matter and radiations, light in particular, it is necessary to introduce the corpuscle concept and the wave concept at the same time. In other words the existence of corpuscles accompanied by waves has to be assumed in all cases. However, since corpuscles and waves cannot be independent because, according to Bohr’s expression, they constitute two complementary forces of reality, it must be possible to establish a certain parallelism between the motion of a corpuscle and the propagation of the associated wave.
We shall content ourselves here by considering the general significance of the results obtained. To sum up the meaning of wave mechanics it can be stated that: "A wave must be associated with each corpuscle and only the study of the wave’s propagation will yield information to us on the successive positions of the corpuscle in space". In conventional large-scale mechanical phenomena the anticipated positions lie along a curve which is the trajectory in the conventional meaning of the word. But what happens if the wave does not propagate according to the laws of optical geometry, if, say, there are interferences and diffraction? Then it is no longer possible to assign to the corpuscle a motion complying with classical dynamics, that much is certain. Is it even still possible to assume that at each moment the corpuscle occupies a well-defined position in the wave and that the wave in its propagation carries the corpuscle along in the same way as a wave would carry along a cork? These are difficult questions and to discuss them would take us too far and even to the confines of philosophy. All that I shall say about them here is that nowadays the tendency in general is to assume that it is not constantly possible to assign to the corpuscle a well-defined position in the wave. I must restrict myself to the assertion that when an observation is carried out enabling the localization of the corpuscle, the observer is invariably induced to assign to the corpuscle a position in the interior of the wave and the probability of it being at a particular point M of the wave is proportional to the square of the amplitude, that is to say the intensity at M.
Hear from Broglie about interference:
If we consider a cloud of corpuscles associated with the same wave, the intensity of the wave at each point is proportional to the cloud density at that point (i.e. to the number of corpuscles per unit volume around that point). This hypothesis is necessary to explain how, in the case of light interferences, the light energy is concentrated at the points where the wave intensity is maximum: if in fact it is assumed that the light energy is carried by light corpuscles, photons, then the photon density in the wave must be proportional to the intensity.
The so called Copenhagen Interpretation avoids the question about whether the electron is a particle or a wave. This question is directly not allowed. In fact, the wave function is an instrument of the theory with not physical meaning. Acording to CI, the goal of the theory is only to make predictions about the results of a specific experiment. In the case of the double slit experiment, we can ask: what is the probability that a given detector at screen will be activated? The theory has a precise answer to this question. But the question: how does an electron behave? does not relate with a specific experimental situation.