The java.lang.Package.getSpecificationTitle() method returns the title of the specification that this package implements.
Following is the declaration for java.lang.Package.getSpecificationTitle() method
public String getSpecificationTitle()
NA
This method returns the specification title, null is returned if it is not known.
NA
The following example shows the usage of lang.Object.getSpecificationTitle() method.
package com.tutorialspoint; public class PackageDemo { public static void main(String[] args) { // get the java lang package Package pack = Package.getPackage("java.lang"); // print the specification title for this package System.out.println("" + pack.getSpecificationTitle()); } }
Let us compile and run the above program, this will produce the following result −
Java Platform API Specification