String getSpecificationVendor()
描述 (Description)
java.lang.Package.getSpecificationVendor()方法返回拥有并维护实现此包的类的规范的组织,供应商或公司的名称。
声明 (Declaration)
以下是java.lang.Package.getSpecificationVendor()方法的声明
public String getSpecificationVendor()
参数 (Parameters)
NA
返回值 (Return Value)
此方法返回规范供应商,如果未知,则返回null。
异常 (Exception)
NA
例子 (Example)
以下示例显示了lang.Object.getSpecificationVendor()方法的用法。
package com.iowiki;
public class PackageDemo {
public static void main(String[] args) {
// get the java lang package
Package pack = Package.getPackage("java.lang");
// print the specification vendor for this package
System.out.println("" + pack.getSpecificationVendor());
}
}
让我们编译并运行上面的程序,这将产生以下结果 -
Oracle Corporation