You will file a Part-Year return for New York and New Jersey where you will be able to allocate the income you earned while you were a resident of each state. You will have to report the income to the state where you earned it even if you were not a resident, but you will be able to claim a credit for the taxes paid to another jurisdiction so you will not be double taxed.
**Say "Thanks" by clicking the thumb icon in a post
**Mark the post that answers your question by clicking on "Mark as Best Answer"