8.14 Q1: When no access modifier is specified for a method or variable, the method or variable:
a. Is public.
b. Is private.
c. Has package access.
d. Is static.
8.14 Q2: Which of the following statements is false?
a. If a program uses multiple classes from the same package, these classes can access each other’s package
access members directly through references to objects of the appropriate classes, or in the case of static
members, through the class name.
b. Package access is rarely used.
c. Classes in the same source file are part of the same package.
d. Use the access modifier package to give a method or variable package access.
8.15 Q1: Which of the following statements is false?
a. An application that requires precise floating-point calculations such as those in financial applications
should use class BigDecimal from package java.math.
b. We use class NumberFormat for formatting numeric values as locale-specific strings.
c. In the U.S, locale, the value 15467.82 would be formatted as “15,467.82“, whereas in many European
locales it would be formatted as “15.467,56″.
d. The BigDecimal method format receives a double argument and returns a BigDecimal object that
represents the exact value specied.
8.15 Q2: BigDecimal gives you control over how values are rounded. By default:
a. all calculations are approximate and no rounding occurs.
b. all calculations are approximate and rounding occurs.
c. all calculations are exact and no rounding occurs.
d. all calculations are exact and rounding occurs.