The program below is the answer to Liang’s Introduction to Java Programming (9th Edition) Chapter 2 Exercise 2.16.

Click here to see other solutions to Introduction to Java Programming.