Java.lang Package Classes

Java Package - getSpecificationVendor() Method



The java.lang.Package.getSpecificationVendor() method returns the name of the organization, vendor, or company that owns and maintains the specification of the classes that implement this package.

Syntax

public String getSpecificationVendor()

Parameters

No parameter is required.

Return Value

Returns the specification vendor, null is returned if it is not known.

Exception

NA.

Example:

The example below shows the usage of java.lang.Package.getSpecificationVendor() method.

import java.lang.*;

public class MyClass {
  public static void main(String[] args) {
    //get the java util package
    Package p = Package.getPackage("java.util");

    //print the vendor specification of the package
    System.out.println(p.getSpecificationVendor());
  }
}

The output of the above code will be:

Oracle Corporation

❮ Java.lang - Package