Java Package - getSpecificationTitle() Method
The java.lang.Package.getSpecificationTitle() method returns the title of the specification that this package implements.
Syntax
public String getSpecificationTitle()
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 the usage of java.lang.Package.getSpecificationTitle() 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 title of the specification of the package System.out.println(p.getSpecificationTitle()); } }
The output of the above code will be:
Java Platform API Specification
❮ Java.lang - Package