i have heard that direct current can be stored in batteries, but we can not store alternating current. is it true? if yes, then why?
This is to do with the way batteries work. Batteries store their energy chemically and the release of electrons is due to a chemical reaction in one side of the battery which are 'collected' by another chemical reaction in the other side. This is termed a Galvanic cell. To create a AC current, the chemical reaction in each side of the cell would periodically have to go into reverse, this does not and cannot happen hence you can only store DC in a battery.
A battery is conceptually very similar to a water pump. A pump creates a pressure difference between its two ends so water flows in an external circuit from the high pressure end, through the circuit and back to the low pressure end. A battery creates a difference in the electrical pressure$^1$ between its two end so electrons will flow out of the anode, though an external circuit and back into the cathode.
With a mechanical water pump you could run the pump alternately forward then in reverse to create an AC water pressure. The mechanical electrical generators that supply the AC electricity to your house do basically this. However a battery works by using a type of chemical reaction called a redox reaction and this only works one way. One terminal of the battery gets reduced and the other gets oxidised, and electrons always flow out of the end that is being oxidised and back into the end that is being reduced.
You can make the reaction run in reverse by applying a voltage to the battery, and this is exactly what happens when you recharge a battery. However if yu leave a battery to itself the reaction only runs one way so it can only ever produce a DC voltage
$^1$ electrical pressure isn't a concept physicists would normally use since we would talk about the electron potential energy. However it is an equivalent concept. Electrons in a metal behave in a surprisingly similar way to a gas.