Below are links to the solutions to Deitel’s Java How to Program (9th Edition) exercises that have been posted so far. This page is updated as more solutions to the exercises are posted. You are “STRONGLY ADVISED” to try to solve the problem first before checking the solution. Note that there are multiple ways of solving problems. That is to say, you may have another way (maybe even better) of solving the problem(s). In such case(s) please let me know. Only solutions to programs are provided here. Answers to self review exercises, multiple choice questions and theoretical questions are not provided. You can test run the programs online for free at ideone.com or repl.it.

#### Chapter Two

Exercise 2.14 – Program to display the numbers 1-4 on screen using different print methods
Exercise 2.15 – Java program to perform simple arithmetics
Exercise 2.16 – Program to compare two numbers using java
Exercise 2.17 – Arithmetic smallest and largest program in Java
Exercise 2.18 – Simple java program to display shapes with asterisks
Exercise 2.24 – Program to find the maximum and minimum of any five integer numbers
Exercise 2.25 – Program to check if a number is odd or even
Exercise 2.26 – Program to check if a number is a multiple of another number
Exercise 2.27 – Checkerboard pattern of asterisks
Exercise 2.28 – Program to calculate the diameter, circumference and area of a circle
Exercise 2.29 – Program to display the integer equivalent of characters
Exercise 2.30 – Program to separate digits in an integer
Exercise 2.31 – Java program to print table of squares and cubes
Exercise 2.32 – Program to count number of negative, positive and zeros input
Exercise 2.33 – Body Mass Index (BMI) Calculator in Java
Exercise 2.34 – Java world population growth calculator
Exercise 2.35 – Car-Pools savings calculator

#### Chapter Three

Exercise 3.11 – Java gradebook program using instance variables
Exercise 3.13 – Program to show how to use constructors in Java
Exercise 3.13 – Program to create invoice of items sold in a store
Exercise 3.14 – Program to calculate and display employee salary
Exercise 3.15 – Java Program to display date

#### Chapter Four

Exercise 4.1 – Java GUI and graphics case study exercise

#### Chapter Five

Exercise 5.32 – Facebook user base growth calculator

1. does anyone have the solution for 18.20 in exercise qs

2. Does anyone have the solution for 17.11 on page 766 in excercises?

3. Anonymous

Waiting for your 3rd and 4th chapter full exercise solution of this book.. Please post as fast as you can :(

4. aby Chutia gand se pagal h kia custructor mai initialize krvadou

5. Yes. I have solved it and added it to the list. You can check it out by clicking here.

6. Hi. I am very busy at the moment. I will post the solutions as soon as possible. Please do check back soon.

7. please sir give us solutions of chapter 10 polymorphism

8. Anonymous

Anyone has solution to question 5.32? (making a difference section)

9. You are welcome.

10. Anonymous

thank u so much, u r super
I'm glad to find these info

11. Hi Mahdi, I don't know any website that offer the answers free. The answers are on the Pearson's website but it is only for "Instructors". You can also find the answers on chegg but it is not free. There is also an incomplete set of answers on github (its free though).