Java.lang Package Classes

Java Package - getImplementationTitle() Method



The java.lang.Package.getImplementationTitle() method returns the title of the specification that this package implements.

Syntax

public String getImplementationTitle()

Parameters

No parameter is required.

Return Value

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

Exception

NA.

Example:

The example below shows how to use java.lang.Package.getImplementationTitle() 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 title of this package
    System.out.println(p.getImplementationTitle());
  }
}

The possible output of the above code could be:

null

❮ Java.lang - Package