Package: getPackage(String name) : Package « java.lang « Java by API






Package: getPackage(String name)

 
/*
 * Output:
 
 */


public class MainClass {
  public static void main(String[] args) {
    Package p = Package.getPackage("javax.swing");
    System.out.print("Swing Version: ");
    System.out.println(p.getSpecificationVersion());

    p = Package.getPackage("java.awt");
    System.out.print("AWT Version: ");
    System.out.println(p.getSpecificationVersion());

  }
}

           
         
  








Related examples in the same category

1.Package: getImplementationTitle()
2.Package: getImplementationVendor()
3.Package: getImplementationVersion()
4.Package: getName()
5.Package: getPackages()
6.Package: getSpecificationTitle()
7.Package: getSpecificationVendor()
8.Package: getSpecificationVersion()