Comparing Data

  • Gary Bennett
  • Brad Lees
  • Mitchell Fisher


In this chapter, we will discuss one of the most basic and frequent operations you will perform as you program: comparing data. In our bookstore example, you may need to compare book titles if your clients are looking for a specific book. You may also need to compare authors if your clients are interested in purchasing books by a specific author. Comparing data is a common task performed by developers. Many of the loops you learned about in the previous chapter will require you to compare data so that you know when your code should stop looping.


Relational Operator Boolean Logic Switch Statement Sale Date Boolean Expression 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Copyright information

© Gary Bennett, Brad Lees and Mitchell Fisher 2016

Authors and Affiliations

  • Gary Bennett
    • 1
  • Brad Lees
    • 2
  • Mitchell Fisher
    • 3
  1. 1.ScottsdaleUSA
  2. 2.PhoenixUSA
  3. 3.BostonUSA

Personalised recommendations