PackageInfo.java public class PackageInfo
{
public static void main(String[] args)
{
Package packageObj = Package.getPackage("java.util");
System.out.println("package name: " + packageObj.getName());
System.out.println("Specification Title: "
+ packageObj.getSpecificationTitle());
System.out.println("Specification Vendor: "
+ packageObj.getSpecificationVendor());
System.out.println("Specification Version: "
+ packageObj.getSpecificationVersion());
System.out.println("Implementaion Title: "
+ packageObj.getImplementationTitle());
System.out.println("Implementation Vendor: "
+ packageObj.getImplementationVendor());
System.out.println("Implementation Version: "
+ packageObj.getImplementationVersion());
System.out.println("Is sealed: " + packageObj.isSealed());
}
}
Output package name: java.util
Specification Title: Java Platform API Specification
Specification Vendor: Oracle Corporation
Specification Version: 1.8
Implementaion Title: Java Runtime Environment
Implementation Vendor: Oracle Corporation
Implementation Version: 1.8.0_40
Is sealed: false