previous | start | next

## JavaBeans Components: An Example

- Java library contains a `TimeZone` class
  - A time zone is identified by a string such as "America/Los_Angeles" or "Asia/Tokyo"
  - `getAvailableIDs` returns a string array containing all IDs:

        String[] ids = TimeZone.getAvailableIDs();

  - `getTimeZone` returns a `TimeZone` object for a given ID string:

        String id = "America/Los_Angeles";
        TimeZone zone = TimeZone.getTimeZone(id);

previous | start | next