CS 2 (Winter 2024) python2java

This series of exercises are intended to get you familiar with Java which is the programming language CS 2 will use. You do not have to do these exercises, but it will make getting started in the course easier.

Reference Sheet

We’ve prepared a Java/Python comparison sheet which might help with the exercises in this primer.

Practice-It

Practice-It is a free tool from University of Washington which you can use to solve Java problems in the browser. To complete these exercises, simply make an account and start typing.

Reading and Writing a Java Class

For Loops

Conditionals

Scanners

While Loops and Booleans

Classes and Object-Oriented Programming

More Advanced Problems