previous | start | next

## JavaBeans Components: An Example

- Use a `DateFormat` object to get a time string:

      DateFormat timeFormatter = DateFormat.getTimeInstance();
      timeFormatter.setTimeZone(zone);
      Date now = new Date();
      // Suppose the server is in New York, and it's noon there
      System.out.println(timeFormatter.format(now));
      // Prints 9:00:00 AM

previous | start | next