Do these second.
Homework is developed as a secondary, personal experience with individual language elements in Java. Do homework assignments after you have completed the related laboratory assignment for the same week. These assignments are "secondary" in the sense that they are expected be done after the laboratory assignments, which are "primary", not in the sense that they are nonessential. In fact, completing homework assignments is insufficient to be adequately prepared for the exams. Homework assignments are insufficiently broad to give you enough experience, in the same way that ordering food in a foreign restaurant is sufficient to familiarize yourself with a foreign language. More complex and subtle usages of the language elements you are learning can be seen in the exams and practice exams, and it is your responsibility to understand those usages as well.
How to do these assignments: When you do homeworks, don't simply work on the homework until it runs correctly. These homeworks are easy enough to get right by accident. Once you can do the homework, go back and ask yourself "Do I understand why every line of code does what it does?" Try making changes to the code to see if the change breaks to code - those changes will teach you more about the code you are learning. Without reservation, you will learn far more from your mistakes than you will from your successes in these homeworks.
Homework developed for [CSE2] was developed by Brian Chen, Brian Davison, Shahida Parvez, Mark Earl, and Edwin Kay. Homework may be used for other courses by permission only (Contact Brian Chen).