dcsimg
 

Exercises

Thursday Mar 1st 2001

Exercises

Bruce Eckel's Thinking in Java Contents | Prev | Next

  1. Write a program that prints values from one to 100.
  2. Modify Exercise 1 so that the program exits by using the break keyword at value 47. Try using return instead.
  3. Create a switch statement that prints a message for each case, and put the switch inside a for loop that tries each case. Put a break after each case and test it, then remove the breaks and see what happens.

o

Contents | Prev | Next
Home
Mobile Site | Full Site
Copyright 2018 © QuinStreet Inc. All Rights Reserved