This textbook is available at## Java Programming (9th Edition)

Book Edition | 9th Edition |

Author(s) | Farrell |

ISBN | 9781337397070 |

Publisher | Cengage |

Subject | Computer Science |

TWO TRUTHS & A LIE

TWO TRUTHS & A LIE

TWO TRUTHS & A LIE

TWO TRUTHS & A LIE

TWO TRUTHS & A LIE

TWO TRUTHS & A LIE

Review Questions

Exercises

Debugging Exercises

Chapter 9, Sorting Array Elements Using the Bubble Sort Algorithm, TWO TRUTHS & A LIE, Exercise 01

Page 423

**TWO TRUTHS & A LIE**

- In an ascending bubble sort, you compare pairs of items, swapping them if they are out of order, so that the largest items "bubble" to the top of the list, eventually creating a sorted list.
- When you sort objects, you usually want to sort based on a particular object field.
- When you make a swap while sorting an array of objects, you typically swap entire objects and not just the field on which the comparison is made.

The answer is

- false
- true
- true

Page 423