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
952 CHAPTER 13 Recursion
Figure 13.5
A Run of Example 13.2 if
the Base Case Is Not
Coded
Figure 13.5 shows a run of Example 13.2 (the RecursiveFactorial class) with
lines 20 to 22 commented out.
13.2.2 Computing the Greatest Common Divisor
A common algebra problem is to calculate the greatest common divisor, or
gcd, of two positive integers. The gcd is the greatest positive integer that
divides evenly into both numbers.
For example, consider 50 and 20. We can figure in our head that 5 divides
evenly into both numbers, but so does 10. Since we cant find a number greater
than 10 that divides evenly into both numbers, 10 is the gcd of 50 and 20.
It is easy ...
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