當前位置: 首頁>>編程示例 >>用法及示例精選 >>正文


Java Java.lang.getSpecificationVendor()用法及代碼示例


描述

這個java.lang.Package.getSpecificationVendor()方法返回擁有和維護實現此包的類的規範的組織、供應商或公司的名稱。

聲明

以下是聲明java.lang.Package.getSpecificationVendor()方法

public String getSpecificationVendor()

參數

NA

返回值

此方法返回規範供應商,如果不知道則返回 null。

異常

NA

示例

下麵的例子展示了 lang.Object.getSpecificationVendor() 方法的用法。

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 vendor for this package
      System.out.println("" + pack.getSpecificationVendor());
   }
}

讓我們編譯並運行上麵的程序,這將產生以下結果——

Oracle Corporation

相關用法


注:本文由純淨天空篩選整理自 Java.lang.getSpecificationVendor() Method。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。