Java.lang Package Classes

Java Package - getImplementationVendor() Method



The java.lang.Package.getImplementationVendor() 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 how to use java.lang.Package.getImplementationVendor() method.

import java.lang.*;

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

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

The possible output of the above code could be:

null

❮ Java.lang - Package