Haloalkanes are of neutral type in aqueous medium. On warming with aqueous sodium or potassium hydroxide the covalently bonded halogen in haloalkane is converted to halide ion.
When this reaction mixture is acidified by adding dilute nitric acid and silver nitrate solution is added a precipitate of silver halide is formed which confirms presence of halogen in the original organic compound.