Any county or municipality may contract with each other or with any other county or municipality for the purpose of acquiring land and constructing thereon a building or buildings or other capital improvements for their joint use. Title thereto shall be taken in the manner and their respective uses provided by agreement between the governing bodies thereof. The expense of acquisition of such land and the construction of a building or buildings or other capital improvements and of the maintenance thereof shall be divided in such manner as the governing bodies shall agree upon.
N.J.S. § 40A:12-10