A class of good integers has been introduced by P. Moree in 1997 together with the characterization of good odd integers. Such integers have shown to have nice number theoretical properties and wide applications. In this paper, a complete characterization of all good integers is given. Two subclasses of good integers are introduced, namely, oddly-good and evenly-good integers. The characterization and properties of good integers in these two subclasses are determined. As applications, good integers and oddly-good integers are applied in the study of the hulls of abelian codes. The average dimension of the hulls of abelian codes is given together with some upper and lower bounds.We note that the published version [8] contains some errors in [8, Proposition 2.1] and [8, Proposition 2.3]. These results have been corrected and updated in this manuscript. The correction does not affect any other part of [8].