|New York is the third most populous state of the United States with a population of more than 19.4 million residents. Situated in the Mid-Atlantic and Northeastern regions of the nation, the state is bordered by Connecticut, Vermont and Massachusetts to the east, and Pennsylvania and New Jersey to the south. Canadian provinces of Ontario and Quebec lie to its north. It also shares a maritime border with Rhode Island east of Long Island. New York State ranks 27th in terms of geographical area with a total area of 54,555 square miles. More than 408 persons live in a square mile of areas, which gives it seventh position among the list of most densely populated state of the country. The State of New York became independent in 1776 and enacted its own constitution in the following year. It joined the Union in 1788 as eleventh state of the US. New York City, the largest city in the state, ranks first among the list of most populous cities in the US. The city has historically been a gateway for immigration to the country, which helped it evolve into a leading financial, cultural, manufacturing and transportation hub. Albany is the capital of the state.