New york constitution
Article VI: judiciary
Section 17

d. The number of the judges of each of such town, village and city courts and the classification and duties of the judges shall be prescribed by the legislature. The terms, method of selection and method of filling vacancies for the judges of such courts shall be prescribed by the legislature, provided, however, that the justices of town courts shall be chosen by the electors of the town for terms of four years from and including the first day of January next after their election.