(a) A person committing the offense of loitering or prowling shall be guilty of a misdemeanor. (b) A violation of this article shall constitute a misdemeanor and shall be tried in the county magistrate court and upon conviction shall be punishable according to section 1-9, general penalty.