New Jersey Residents, Nonresidents
The NJ tax return residency is determined by where a taxpayer was domiciled during the tax year. If a taxpayer moved in to or out of New Jersey for part of the tax year, the taxpayer is a a part-year resident. In this case a NJ resident tax return might be required to report the income received for the period you resided in NJ
If you were not domiciled in New Jersey, but received source income from or in New Jersey, a a nonresident tax return might be required. Source here income means the money you earned in New Jersey.
A domicile is the place and state you consider your permanent home — the place where you intend to return after a period of absence (e.g. vacation, business assignment, educational leave, etc.). There are exception for members of the military.