The militia shall consist of all able-bodied male persons, residents of the State, between the ages of eighteen and forty-five years, except such as may be exempted by the laws of the United States or this State, and shall be organized, officered, armed and equipped and trained in such manner as may be provided by law.