A good answer might be:

if (  speed <= 800  ||  memory <= 128 )
  System.out.println("Reject this computer");
else
  System.out.println("Acceptable computer");

The following might be an even better way to write this code fragment:

if (  speed > 800  &&  memory > 128 )
  System.out.println("Acceptable computer");
else
  System.out.println("Reject this computer");

End of the Chapter

That is the end of this chapter. If you (are a good student) or (you are interested) you may wish to review the following.



Click here     Back to the main menu.

You have reached the end of the chapter.