The answer to 'difference between gas water heater and electric water heater' is that gas water heaters use natural gas or propane to heat the water, while electric water heaters use electricity. Gas water heaters are generally more efficient and have lower operating costs, but require a gas line connection. Electric water heaters are simpler to install and don't require a gas line, but have higher energy costs.
Gas water heaters heat the water faster and can recover more quickly after hot water usage. They are also better suited for homes with high hot water demand. Electric water heaters are better for small homes or apartments with lower hot water needs. The upfront cost of a gas water heater is typically higher, but it may be offset by the lower long-term operating costs.