Today's class
- First I did a while loop example.
- Then I gave another example of a while loop
- The next two examples are the same as Sum.java above but I didn't put the code in a main method. The first example I put it in the constructor, the next I put it in a method. Figure out when it needs to be static and when you need an instance to call it.
|