twoConsecutive

Category: Programming
Author: Helene Martin and Marty Stepp
Book Chapter: 4.4
Problem: twoConsecutive
Write a static method named twoConsecutive that accepts three integers as parameters and returns true if there is at least one pair of integers that differ by exactly 1. For example, the integers 3 and 4 differ by 1. The integers 12 and 11 also differ by 1. Your method should return false if there are no such consecutive values. The integers could be passed in any order; the two consecutive values could be any of the two values passed in.