A method for plating tin or a tin alloy on a substrate such that whiskers are prevented form forming or the number of whickers is reduced in number as well as size.