Get the specification title, vendor and version

ReturnMethodSummary
StringgetSpecificationTitle()Return the title of the specification.
StringgetSpecificationVendor()Return the name of the organization, vendor.
StringgetSpecificationVersion()Returns the version number.

public class Main {
  public static void main(String[] args) {
    Package p = Package.getPackage("javax.swing");

    System.out.println(p.getSpecificationTitle());
    System.out.println(p.getSpecificationVendor());
    System.out.println(p.getSpecificationVersion());
  }
}

The output:


Java Platform API Specification
Sun Microsystems, Inc.
1.6
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.