Skip to Main Content
Java 6 Illuminated: An Active Learning Approach, 2nd Edition
book

Java 6 Illuminated: An Active Learning Approach, 2nd Edition

by Julie Anderson, Herve J. Franceschi
February 2008
Intermediate to advanced content levelIntermediate to advanced
1288 pages
39h 39m
English
Jones & Bartlett Learning
Content preview from Java 6 Illuminated: An Active Learning Approach, 2nd Edition
532 CHAPTER 8 Single-Dimensional Arrays
The element at index 6 (22) is smaller than 34, so we search in the right
subarray. The value of middle is now 7.
At this point, start, end, and middle all have the value 7. The element at
index 7 (36) is larger than 34, so we assign end the value middle 1, which
is 6. This makes end less than start and consequently makes the while loop
condition evaluate to false. We have not found 34, so we return 1.
8.7 Programming Activity 2:Searching and Sorting Arrays
In this activity, you will work again with a 15-element integer array, per-
forming these activities:
1. Write a method to perform a Sequential Search of ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

JFC Swing Tutorial, The: A Guide to Constructing GUIs, Second Edition

JFC Swing Tutorial, The: A Guide to Constructing GUIs, Second Edition

Kathy Walrath, Mary Campione, Alison Huml, Sharon Zakhour
Java Illuminated, 4th Edition

Java Illuminated, 4th Edition

Julie Anderson, Hervé J. Franceschi

Publisher Resources

ISBN: 9780763749637