8 Classes and Objects: A Deeper Look
Objectives
In this chapter you’ll:
-
See additional details of creating class declarations.
-
Use the
throw
statement to indicate that a problem has occurred. -
Use keyword
this
in a constructor to call another constructor in the same class. -
Use
static
variables and methods. -
Import
static
members of a class. -
Use the
enum
type to create sets of constants with unique identifiers. -
Declare
enum
constants with parameters. -
Use
BigDecimal
for precise monetary calculations.
Get Java How to Program, Early Objects, 11th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.