先看下JDK中的說明:
呼蘭ssl適用于網(wǎng)站、小程序/APP、API接口等需要進(jìn)行數(shù)據(jù)傳輸應(yīng)用場景,ssl證書未來市場廣闊!成為創(chuàng)新互聯(lián)公司的ssl證書銷售渠道,可以享受市場價(jià)格4-6折優(yōu)惠!如果有意向歡迎電話聯(lián)系或者加微信:18982081108(備注:SSL證書合作)期待與您的合作!java.lang.Object java.lang.Class<T> Instances of the class Class represent classes and interfaces in a running Java application. An enum is a kind of class and an annotation is a kind of interface. Every array also belongs to a class that is reflected as a Class object that is shared by all arrays with the same element type and number of dimensions. The primitive Java types (boolean, byte, char, short, int, long, float, and double), and the keyword void are also represented as Class objects. Class has no public constructor. Instead Class objects are constructed automatically by the Java Virtual Machine as classes are loaded and by calls to the defineClass method in the class loader. The following example uses a Class object to print the class name of an object: void printClassName(Object obj) { System.out.println("The class of " + obj + " is " + obj.getClass().getName()); } It is also possible to get the Class object for a named type (or for void) using a class literal. System.out.println("The name of class Foo is: "+Foo.class.getName()); 在一個(gè)運(yùn)行著的JAVA應(yīng)用中,類的任何實(shí)例都可以用Class對象來指代,Class可以指代所有的類和接口。枚舉屬于類,注解屬于接口,均可以用Class指代。每個(gè)數(shù)組均屬于反射的Class對象,數(shù)組中的每個(gè)元素和維度也同樣擁有Class對象。Java基本類型(boolean, byte, char, short, int, long, float, and double)以及關(guān)鍵字void也都可以用Class指代。 Class類不存在構(gòu)造函數(shù),當(dāng)類被加載過程中由JVM通過調(diào)用類加載器中的defineClass方法自動(dòng)構(gòu)造。 下面的例子是將一個(gè)對象通過Class對象打印出類名。 void printClassName(Object obj) { System.out.println("The class of " + obj + " is " + obj.getClass().getName()); } 通過class關(guān)鍵字指定類型也是可以得到Class對象的 System.out.println("The name of class Foo is: "+Foo.class.getName());
文章標(biāo)題:基于Javaclass對象說明、Java靜態(tài)變量聲明和賦值說明(詳解)-創(chuàng)新互聯(lián)
標(biāo)題URL:http://aaarwkj.com/article10/cchego.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供自適應(yīng)網(wǎng)站、Google、小程序開發(fā)、外貿(mào)網(wǎng)站建設(shè)、手機(jī)網(wǎng)站建設(shè)、網(wǎng)站建設(shè)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容