June 2005
Beginner to intermediate
312 pages
6h 24m
English
The puzzles in this chapter concern basic library-related topics, such as Object methods, collections, Date, and Calendar.
As a warm-up, test your knowledge of BigInteger. What does this program print?
import java.math.BigInteger;public class BigProblem { public static void main(String[ ] args) { BigInteger fiveThousand = new BigInteger("5000"); BigInteger fiftyThousand = new BigInteger("50000"); BigInteger fiveHundredThousand = new BigInteger("500000"); BigInteger total = BigInteger.ZERO; total.add(fiveThousand); total.add(fiftyThousand); total.add(fiveHundredThousand); System.out.println(total); }}